aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-25 16:11:06 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-25 16:11:06 +0000
commitbe5bf50ec7e36a41407fe260d1ebba753c754580 (patch)
tree0509cb93c708132fa4e1d80e45f6fd315d41f5b6
parent8e997c10a4a46163712f866d7fae3827c35d0443 (diff)
downloadpaludis-be5bf50ec7e36a41407fe260d1ebba753c754580.tar.gz
paludis-be5bf50ec7e36a41407fe260d1ebba753c754580.tar.xz
Create repositories for each package database
-rw-r--r--paludis/qa/qa_environment.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/paludis/qa/qa_environment.cc b/paludis/qa/qa_environment.cc
index c43ee0a..6455116 100644
--- a/paludis/qa/qa_environment.cc
+++ b/paludis/qa/qa_environment.cc
@@ -61,11 +61,25 @@ namespace paludis
+ *line + "'");
continue;
}
+
+ AssociativeCollection<std::string, std::string>::Pointer keys(
+ new AssociativeCollection<std::string, std::string>::Concrete);
+
+ keys->insert("format", "portage");
+ keys->insert("importace", "1");
+ keys->insert("location", stringify(base));
+ keys->insert("cache", "/var/empty");
+ keys->insert("profiles", stringify(base / "profiles" / tokens.at(1)));
+
+ PackageDatabase::Pointer db(new PackageDatabase(env));
+ db->add_repository(RepositoryMaker::get_instance()->find_maker("portage")(env,
+ db.raw_pointer(), keys));
+
package_databases.push_back(PackageDatabasesEntry(PackageDatabasesEntry::create()
.arch(UseFlagName(tokens.at(0)))
.location(base / "profiles" / tokens.at(1))
.status(tokens.at(2))
- .package_database(PackageDatabase::Pointer(new PackageDatabase(env)))));
+ .package_database(db)));
}
if (package_databases.empty())
@@ -87,18 +101,6 @@ QAEnvironment::QAEnvironment(const FSEntry & base) :
QAEnvironmentBase(base, this),
Environment(_imp->package_databases.begin()->package_database)
{
- AssociativeCollection<std::string, std::string>::Pointer keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
-
- keys->insert("format", "portage");
- keys->insert("importace", "1");
- keys->insert("location", stringify(base));
- keys->insert("cache", "/var/empty");
- keys->insert("profile", stringify(base / "profiles" / "base"));
-
- package_database()->add_repository(
- RepositoryMaker::get_instance()->find_maker("portage")(this,
- package_database().raw_pointer(), keys));
}
QAEnvironment::~QAEnvironment()