aboutsummaryrefslogtreecommitdiff
path: root/src/clients/qualudis/qualudis.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-10 22:10:17 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-10 22:12:06 +0100
commitca07bf6393b0db1cc3162da8ef0eac9c9ba484e8 (patch)
treea40b5441cd5d2587e4e7c959cddbf826df39e6f9 /src/clients/qualudis/qualudis.cc
parentb72601a91b640a34c7aa2dc1ef92428ecf22b1cc (diff)
downloadpaludis-ca07bf6393b0db1cc3162da8ef0eac9c9ba484e8.tar.gz
paludis-ca07bf6393b0db1cc3162da8ef0eac9c9ba484e8.tar.xz
Change how NoConfigEnvironment does masters.
Now rather than specifying the master repository directory, we specify the master repository name (if there's no layout.conf) and a number of extra repository directories. Clients now use --extra-repository-dir (possibly multiple times) and --master-repository-name (if it can't be determined automatically) instead of --master-repository-dir. Fixes: ticket:635.
Diffstat (limited to 'src/clients/qualudis/qualudis.cc')
-rw-r--r--src/clients/qualudis/qualudis.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index bdf4722..b5fe133 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -335,15 +335,19 @@ int main(int argc, char *argv[])
if (! QualudisCommandLine::get_instance()->a_write_cache_dir.specified())
QualudisCommandLine::get_instance()->a_write_cache_dir.set_argument("/var/empty");
- if (! QualudisCommandLine::get_instance()->a_master_repository_dir.specified())
- QualudisCommandLine::get_instance()->a_master_repository_dir.set_argument("/var/empty");
+ std::tr1::shared_ptr<FSEntrySequence> extra_repository_dirs(new FSEntrySequence);
+ for (args::StringSequenceArg::ConstIterator d(QualudisCommandLine::get_instance()->a_extra_repository_dir.begin_args()),
+ d_end(QualudisCommandLine::get_instance()->a_extra_repository_dir.end_args()) ;
+ d != d_end ; ++d)
+ extra_repository_dirs->push_back(*d);
std::tr1::shared_ptr<NoConfigEnvironment> env(new NoConfigEnvironment(no_config_environment::Params::create()
.repository_dir(get_location())
.write_cache(QualudisCommandLine::get_instance()->a_write_cache_dir.argument())
.accept_unstable(false)
.repository_type(no_config_environment::ncer_ebuild)
- .master_repository_dir(QualudisCommandLine::get_instance()->a_master_repository_dir.argument())
+ .extra_repository_dirs(extra_repository_dirs)
+ .master_repository_name(QualudisCommandLine::get_instance()->a_master_repository_name.argument())
.disable_metadata_cache(! QualudisCommandLine::get_instance()->a_use_repository_cache.specified())
.extra_params(std::tr1::shared_ptr<Map<std::string, std::string> >())
.extra_accept_keywords("")