aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2007-08-31 18:01:40 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2007-08-31 18:01:40 +0000
commitb21a7c15fd1e96bd040ceabab608ad3d3a49eaf7 (patch)
tree63ea6c36897dcfa7388a19e8a08dd13be9a99e58
parentf61d05dcb0459a7678b64c65d9823c2f5069b54d (diff)
downloadpaludis-b21a7c15fd1e96bd040ceabab608ad3d3a49eaf7.tar.gz
paludis-b21a7c15fd1e96bd040ceabab608ad3d3a49eaf7.tar.xz
Add --master-repository-dir to adjutrix
-rw-r--r--src/clients/adjutrix/adjutrix.cc6
-rw-r--r--src/clients/adjutrix/command_line.cc4
-rw-r--r--src/clients/adjutrix/command_line.hh1
-rw-r--r--src/clients/adjutrix/find_dropped_keywords.cc4
-rw-r--r--src/clients/adjutrix/find_dropped_keywords.hh4
-rw-r--r--src/clients/adjutrix/find_insecure_packages.cc4
-rw-r--r--src/clients/adjutrix/find_insecure_packages.hh4
-rw-r--r--src/clients/adjutrix/find_reverse_deps.cc2
-rw-r--r--src/clients/adjutrix/find_stable_candidates.cc4
-rw-r--r--src/clients/adjutrix/find_stable_candidates.hh4
-rw-r--r--src/clients/adjutrix/find_unused_packages.cc4
-rw-r--r--src/clients/adjutrix/find_unused_packages.hh4
-rw-r--r--src/clients/adjutrix/keywords_graph.cc4
-rw-r--r--src/clients/adjutrix/keywords_graph.hh4
14 files changed, 35 insertions, 18 deletions
diff --git a/src/clients/adjutrix/adjutrix.cc b/src/clients/adjutrix/adjutrix.cc
index 82ab44f..77a868f 100644
--- a/src/clients/adjutrix/adjutrix.cc
+++ b/src/clients/adjutrix/adjutrix.cc
@@ -144,6 +144,8 @@ main(int argc, char *argv[])
if (! CommandLine::get_instance()->a_write_cache_dir.specified())
CommandLine::get_instance()->a_write_cache_dir.set_argument("/var/empty");
+ if (! CommandLine::get_instance()->a_master_repository_dir.specified())
+ CommandLine::get_instance()->a_master_repository_dir.set_argument("/var/empty");
NoConfigEnvironment env(no_config_environment::Params::create()
.repository_dir(get_location_and_add_filters())
@@ -153,8 +155,8 @@ main(int argc, char *argv[])
(CommandLine::get_instance()->a_reverse_deps.specified()) ? no_config_environment::ncer_auto :
no_config_environment::ncer_ebuild)
.disable_metadata_cache(false)
- .extra_params(tr1::shared_ptr<Map<std::string, std::string> >())
- .master_repository_dir(FSEntry("/var/empty")));
+ .master_repository_dir(CommandLine::get_instance()->a_master_repository_dir.argument())
+ .extra_params(tr1::shared_ptr<Map<std::string, std::string> >()));
if (CommandLine::get_instance()->a_find_stable_candidates.specified())
{
diff --git a/src/clients/adjutrix/command_line.cc b/src/clients/adjutrix/command_line.cc
index 1045005..9365748 100644
--- a/src/clients/adjutrix/command_line.cc
+++ b/src/clients/adjutrix/command_line.cc
@@ -99,7 +99,9 @@ CommandLine::CommandLine() :
configuration_options(this, "Configuration options",
"Options that control general configuration."),
a_write_cache_dir(&configuration_options, "write-cache-dir", '\0',
- "Use a subdirectory named for the repository name under the specified directory for repository write cache")
+ "Use a subdirectory named for the repository name under the specified directory for repository write cache"),
+ a_master_repository_dir(&configuration_options, "master-repository-dir", '\0',
+ "Use the specified location for the master repository")
{
add_usage_line("--find-stable-candidates arch [ --repository-dir /path ] "
"[ --category app-misc --category sys-apps ... ] "
diff --git a/src/clients/adjutrix/command_line.hh b/src/clients/adjutrix/command_line.hh
index 7996bd1..9a9eb0d 100644
--- a/src/clients/adjutrix/command_line.hh
+++ b/src/clients/adjutrix/command_line.hh
@@ -120,6 +120,7 @@ class CommandLine :
paludis::args::ArgsGroup configuration_options;
paludis::args::StringArg a_write_cache_dir;
+ paludis::args::StringArg a_master_repository_dir;
///\}
};
diff --git a/src/clients/adjutrix/find_dropped_keywords.cc b/src/clients/adjutrix/find_dropped_keywords.cc
index 2536dd6..d78b79c 100644
--- a/src/clients/adjutrix/find_dropped_keywords.cc
+++ b/src/clients/adjutrix/find_dropped_keywords.cc
@@ -165,7 +165,7 @@ namespace
}
}
-void do_find_dropped_keywords(const Environment & env)
+void do_find_dropped_keywords(const NoConfigEnvironment & env)
{
Context context("When performing find-dropped-keywords action:");
@@ -177,6 +177,8 @@ void do_find_dropped_keywords(const Environment & env)
{
if (r->name() == RepositoryName("virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
write_repository_header(keyword, r->name());
diff --git a/src/clients/adjutrix/find_dropped_keywords.hh b/src/clients/adjutrix/find_dropped_keywords.hh
index e6bbe22..052a188 100644
--- a/src/clients/adjutrix/find_dropped_keywords.hh
+++ b/src/clients/adjutrix/find_dropped_keywords.hh
@@ -20,9 +20,9 @@
#ifndef PALUDIS_GUARD_SRC_ARCHTOOL_FIND_DROPPED_KEYWORDS_HH
#define PALUDIS_GUARD_SRC_ARCHTOOL_FIND_DROPPED_KEYWORDS_HH 1
-#include <paludis/environment.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
-void do_find_dropped_keywords(const paludis::Environment & env);
+void do_find_dropped_keywords(const paludis::NoConfigEnvironment & env);
#endif
diff --git a/src/clients/adjutrix/find_insecure_packages.cc b/src/clients/adjutrix/find_insecure_packages.cc
index f974e5b..23d1c1d 100644
--- a/src/clients/adjutrix/find_insecure_packages.cc
+++ b/src/clients/adjutrix/find_insecure_packages.cc
@@ -119,7 +119,7 @@ namespace
}
}
-void do_find_insecure_packages(const Environment & env)
+void do_find_insecure_packages(const NoConfigEnvironment & env)
{
Context context("When performing find-insecure-packages action:");
@@ -129,6 +129,8 @@ void do_find_insecure_packages(const Environment & env)
{
if (r->name() == RepositoryName("virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
if (! r->sets_interface)
continue;
diff --git a/src/clients/adjutrix/find_insecure_packages.hh b/src/clients/adjutrix/find_insecure_packages.hh
index a8c1cc0..15c28d4 100644
--- a/src/clients/adjutrix/find_insecure_packages.hh
+++ b/src/clients/adjutrix/find_insecure_packages.hh
@@ -20,8 +20,8 @@
#ifndef PALUDIS_GUARD_SRC_ADJUTRIX_FIND_INSECURE_PACKAGES_HH
#define PALUDIS_GUARD_SRC_ADJUTRIX_FIND_INSECURE_PACKAGES_HH 1
-#include <paludis/environment.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
-void do_find_insecure_packages(const paludis::Environment & env);
+void do_find_insecure_packages(const paludis::NoConfigEnvironment & env);
#endif
diff --git a/src/clients/adjutrix/find_reverse_deps.cc b/src/clients/adjutrix/find_reverse_deps.cc
index d83e423..80872c3 100644
--- a/src/clients/adjutrix/find_reverse_deps.cc
+++ b/src/clients/adjutrix/find_reverse_deps.cc
@@ -268,6 +268,8 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
{
if (r->name() == RepositoryName("virtuals") || r->name() == RepositoryName("installed_virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
write_repository_header(stringify(*spec), stringify(r->name()));
diff --git a/src/clients/adjutrix/find_stable_candidates.cc b/src/clients/adjutrix/find_stable_candidates.cc
index eed3ad8..024ce30 100644
--- a/src/clients/adjutrix/find_stable_candidates.cc
+++ b/src/clients/adjutrix/find_stable_candidates.cc
@@ -168,7 +168,7 @@ namespace
}
}
-void do_find_stable_candidates(const Environment & env)
+void do_find_stable_candidates(const NoConfigEnvironment & env)
{
Context context("When performing find-stable-candidates action:");
@@ -180,6 +180,8 @@ void do_find_stable_candidates(const Environment & env)
{
if (r->name() == RepositoryName("virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
write_repository_header(keyword, r->name());
diff --git a/src/clients/adjutrix/find_stable_candidates.hh b/src/clients/adjutrix/find_stable_candidates.hh
index 2860975..f66da0b 100644
--- a/src/clients/adjutrix/find_stable_candidates.hh
+++ b/src/clients/adjutrix/find_stable_candidates.hh
@@ -20,8 +20,8 @@
#ifndef PALUDIS_GUARD_SRC_ARCHTOOL_FIND_STABLE_CANDIDATES_HH
#define PALUDIS_GUARD_SRC_ARCHTOOL_FIND_STABLE_CANDIDATES_HH 1
-#include <paludis/environment.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
-void do_find_stable_candidates(const paludis::Environment & env);
+void do_find_stable_candidates(const paludis::NoConfigEnvironment & env);
#endif
diff --git a/src/clients/adjutrix/find_unused_packages.cc b/src/clients/adjutrix/find_unused_packages.cc
index 8157bfa..ce98a0a 100644
--- a/src/clients/adjutrix/find_unused_packages.cc
+++ b/src/clients/adjutrix/find_unused_packages.cc
@@ -38,7 +38,7 @@ using std::cout;
using std::cerr;
using std::endl;
-void do_find_unused_packages(const Environment & env)
+void do_find_unused_packages(const NoConfigEnvironment & env)
{
Context context("When performing find-unused-packages action:");
@@ -48,6 +48,8 @@ void do_find_unused_packages(const Environment & env)
{
if (r->name() == RepositoryName("virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
if (! r->use_interface)
continue;
diff --git a/src/clients/adjutrix/find_unused_packages.hh b/src/clients/adjutrix/find_unused_packages.hh
index 0b38ff8..de6bd68 100644
--- a/src/clients/adjutrix/find_unused_packages.hh
+++ b/src/clients/adjutrix/find_unused_packages.hh
@@ -20,8 +20,8 @@
#ifndef PALUDIS_GUARD_SRC_ADJUTRIX_FIND_UNUSED_PACKAGES_HH
#define PALUDIS_GUARD_SRC_ADJUTRIX_FIND_UNUSED_PACKAGES_HH 1
-#include <paludis/environment.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
-void do_find_unused_packages(const paludis::Environment & env);
+void do_find_unused_packages(const paludis::NoConfigEnvironment & env);
#endif
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 27265bc..93a80ff 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -183,7 +183,7 @@ namespace
}
}
-void do_keywords_graph(const Environment & env)
+void do_keywords_graph(const NoConfigEnvironment & env)
{
Context context("When performing keywords-graph action:");
@@ -193,6 +193,8 @@ void do_keywords_graph(const Environment & env)
{
if (r->name() == RepositoryName("virtuals"))
continue;
+ if (env.master_repository() && r->name() == env.master_repository()->name())
+ continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
diff --git a/src/clients/adjutrix/keywords_graph.hh b/src/clients/adjutrix/keywords_graph.hh
index 7376143..bfbde8d 100644
--- a/src/clients/adjutrix/keywords_graph.hh
+++ b/src/clients/adjutrix/keywords_graph.hh
@@ -20,8 +20,8 @@
#ifndef PALUDIS_GUARD_SRC_ARCHTOOL_KEYWORDS_GRAPH_HH
#define PALUDIS_GUARD_SRC_ARCHTOOL_KEYWORDS_GRAPH_HH 1
-#include <paludis/environment.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
-void do_keywords_graph(const paludis::Environment & env);
+void do_keywords_graph(const paludis::NoConfigEnvironment & env);
#endif