aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_import.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 18:58:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 19:00:38 +0000
commit5c2a332b70243cb583a29bb74f712bfca2c1fb76 (patch)
tree0a01f8e624caa2c6639181df45fa80bc20adba84 /src/clients/cave/cmd_import.cc
parent79d9f02fb355d81c472f3d94b8b85d5a7639210c (diff)
downloadpaludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.gz
paludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.xz
Use Environment rather than PackageDatabase
Diffstat (limited to 'src/clients/cave/cmd_import.cc')
-rw-r--r--src/clients/cave/cmd_import.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/clients/cave/cmd_import.cc b/src/clients/cave/cmd_import.cc
index 48a3d789b..04bb0b4ef 100644
--- a/src/clients/cave/cmd_import.cc
+++ b/src/clients/cave/cmd_import.cc
@@ -37,7 +37,6 @@
#include <paludis/repository.hh>
#include <paludis/metadata_key.hh>
#include <paludis/repository_factory.hh>
-#include <paludis/package_database.hh>
#include <paludis/unformatted_pretty_printer.hh>
#include <iostream>
@@ -224,7 +223,7 @@ ImportCommand::run(
for (PackageIDSequence::ConstIterator i(old_ids->begin()), i_end(old_ids->end()) ;
i != i_end ; ++i)
{
- auto repo(env->package_database()->fetch_repository((*i)->repository_name()));
+ auto repo(env->fetch_repository((*i)->repository_name()));
if (! repo->format_key())
continue;
if (repo->format_key()->value() != "installed_unpackaged")
@@ -291,7 +290,7 @@ ImportCommand::run(
keys->insert("preserve_work", preserve_work);
std::shared_ptr<Repository> repo(RepositoryFactory::get_instance()->create(env.get(),
std::bind(from_keys, keys, std::placeholders::_1)));
- env->package_database()->add_repository(10, repo);
+ env->add_repository(10, repo);
std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(package, { }));
if (1 != std::distance(ids->begin(), ids->end()))
throw InternalError(PALUDIS_HERE, "ids is '" + join(indirect_iterator(ids->begin()), indirect_iterator(