aboutsummaryrefslogtreecommitdiff
path: root/src/clients
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-13 13:53:06 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-13 13:53:06 +0100
commitd4ae54b97e6fc3218443b389618ee1c71674c097 (patch)
tree9ad5879ac7cb7ffa0511cd0e1a804006b0c5e50f /src/clients
parent7db9b623aa303e9c16bb113444e9fcceb0e0cddf (diff)
downloadpaludis-d4ae54b97e6fc3218443b389618ee1c71674c097.tar.gz
paludis-d4ae54b97e6fc3218443b389618ee1c71674c097.tar.xz
env->root() -> env->preferred_root_key()
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/cave/cmd_contents.cc6
-rw-r--r--src/clients/cave/cmd_info.cc4
-rw-r--r--src/clients/cave/cmd_print_id_contents.cc4
-rw-r--r--src/clients/cave/cmd_verify.cc6
-rw-r--r--src/clients/cave/executables_common.cc4
-rw-r--r--src/clients/cave/owner_common.cc2
-rw-r--r--src/clients/paludis/applets.cc8
-rw-r--r--src/clients/paludis/do_config.cc4
-rw-r--r--src/clients/paludis/do_contents.cc6
-rw-r--r--src/clients/paludis/do_executables.cc6
-rw-r--r--src/clients/paludis/info.cc2
-rw-r--r--src/clients/paludis/uninstall.cc3
12 files changed, 28 insertions, 27 deletions
diff --git a/src/clients/cave/cmd_contents.cc b/src/clients/cave/cmd_contents.cc
index 0af6e25c0..9ff5f325d 100644
--- a/src/clients/cave/cmd_contents.cc
+++ b/src/clients/cave/cmd_contents.cc
@@ -124,13 +124,13 @@ ContentsCommand::run(
throw args::DoHelp("contents takes exactly one parameter");
PackageDepSpec spec(parse_user_package_dep_spec(*cmdline.begin_parameters(), env.get(),
- { }, filter::InstalledAtRoot(env->root())));
+ { }, filter::InstalledAtRoot(env->preferred_root_key()->value())));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
- nothing_matching_error(env.get(), *cmdline.begin_parameters(), filter::InstalledAtRoot(env->root()));
+ nothing_matching_error(env.get(), *cmdline.begin_parameters(), filter::InstalledAtRoot(env->preferred_root_key()->value()));
const std::shared_ptr<const PackageID> id(*entries->last());
if (! id->contents_key())
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index 3114932a1..2caab8e1a 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -363,12 +363,12 @@ namespace
PackageDepSpec spec(parse_user_package_dep_spec(param, env.get(), { }));
const std::shared_ptr<const PackageIDSequence> installed_ids((*env)[selection::AllVersionsSorted(generator::Matches(
- spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
const std::shared_ptr<const PackageIDSequence> installable_ids((*env)[selection::BestVersionOnly(generator::Matches(
spec, { }) | filter::SupportsAction<InstallAction>() | filter::NotMasked())]);
if (installed_ids->empty() && installable_ids->empty())
- nothing_matching_error(env.get(), param, filter::InstalledAtRoot(env->root()));
+ nothing_matching_error(env.get(), param, filter::InstalledAtRoot(env->preferred_root_key()->value()));
for (PackageIDSequence::ConstIterator i(installed_ids->begin()), i_end(installed_ids->end()) ;
i != i_end ; ++i)
diff --git a/src/clients/cave/cmd_print_id_contents.cc b/src/clients/cave/cmd_print_id_contents.cc
index b67269e63..aeeb789e8 100644
--- a/src/clients/cave/cmd_print_id_contents.cc
+++ b/src/clients/cave/cmd_print_id_contents.cc
@@ -158,10 +158,10 @@ PrintIDContentsCommand::run(
throw args::DoHelp("print-id-contents takes exactly one parameter");
PackageDepSpec spec(parse_user_package_dep_spec(*cmdline.begin_parameters(), env.get(),
- { updso_allow_wildcards }, filter::InstalledAtRoot(env->root())));
+ { updso_allow_wildcards }, filter::InstalledAtRoot(env->preferred_root_key()->value())));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
throw NothingMatching(spec);
diff --git a/src/clients/cave/cmd_verify.cc b/src/clients/cave/cmd_verify.cc
index b80816565..b1ed122a6 100644
--- a/src/clients/cave/cmd_verify.cc
+++ b/src/clients/cave/cmd_verify.cc
@@ -203,13 +203,13 @@ VerifyCommand::run(
throw args::DoHelp("verify takes exactly one parameter");
PackageDepSpec spec(parse_user_package_dep_spec(*cmdline.begin_parameters(), env.get(),
- { updso_allow_wildcards }, filter::InstalledAtRoot(env->root())));
+ { updso_allow_wildcards }, filter::InstalledAtRoot(env->preferred_root_key()->value())));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
- nothing_matching_error(env.get(), *cmdline.begin_parameters(), filter::InstalledAtRoot(env->root()));
+ nothing_matching_error(env.get(), *cmdline.begin_parameters(), filter::InstalledAtRoot(env->preferred_root_key()->value()));
int exit_status(0);
for (PackageIDSequence::ConstIterator i(entries->begin()), i_end(entries->end()) ;
diff --git a/src/clients/cave/executables_common.cc b/src/clients/cave/executables_common.cc
index b3ce92028..f54a7d3b3 100644
--- a/src/clients/cave/executables_common.cc
+++ b/src/clients/cave/executables_common.cc
@@ -112,8 +112,8 @@ paludis::cave::executables_common(
PackageDepSpec(parse_user_package_dep_spec(
param, env.get(),
{ updso_allow_wildcards },
- filter::InstalledAtRoot(env->root()))),
- { }) | filter::InstalledAtRoot(env->root()))]);
+ filter::InstalledAtRoot(env->preferred_root_key()->value()))),
+ { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
throw NoSuchPackageError(param);
diff --git a/src/clients/cave/owner_common.cc b/src/clients/cave/owner_common.cc
index 4c7544456..9d1b030f0 100644
--- a/src/clients/cave/owner_common.cc
+++ b/src/clients/cave/owner_common.cc
@@ -83,7 +83,7 @@ paludis::cave::owner_common(
}
std::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(generator::All() |
- filter::InstalledAtRoot(env->root()))]);
+ filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
for (PackageIDSequence::ConstIterator p(ids->begin()), p_end(ids->end()); p != p_end; ++p)
{
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 52091c0cc..7ce8eb4b9 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -188,7 +188,7 @@ int do_has_version(const std::shared_ptr<Environment> & env)
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(query, env.get(), { })));
std::shared_ptr<const PackageIDSequence> entries((*env)[selection::SomeArbitraryVersion(
- generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
return_code = 1;
@@ -206,7 +206,7 @@ int do_best_version(const std::shared_ptr<Environment> & env)
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(query, env.get(), { })));
std::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
/* make built_with_use work for virtuals... icky... */
while (! entries->empty())
@@ -247,7 +247,7 @@ int do_match(const std::shared_ptr<Environment> & env)
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(query, env.get(), { })));
std::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
while (! entries->empty())
{
@@ -292,7 +292,7 @@ int do_environment_variable(const std::shared_ptr<Environment> & env)
parse_user_package_dep_spec(spec_str, env.get(), { })));
std::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
entries = (*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }))];
diff --git a/src/clients/paludis/do_config.cc b/src/clients/paludis/do_config.cc
index 3bc40c09e..c1d14ee90 100644
--- a/src/clients/paludis/do_config.cc
+++ b/src/clients/paludis/do_config.cc
@@ -78,10 +78,10 @@ namespace
std::shared_ptr<PackageDepSpec> spec(
std::make_shared<PackageDepSpec>(parse_user_package_dep_spec(target, env.get(), { },
- filter::InstalledAtRoot(env->root()))));
+ filter::InstalledAtRoot(env->preferred_root_key()->value()))));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsUnsorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsUnsorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
throw NoSuchPackageError(target);
diff --git a/src/clients/paludis/do_contents.cc b/src/clients/paludis/do_contents.cc
index d713e2b2d..e15189e08 100644
--- a/src/clients/paludis/do_contents.cc
+++ b/src/clients/paludis/do_contents.cc
@@ -84,10 +84,10 @@ do_one_contents(
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_allow_wildcards,
- filter::InstalledAtRoot(env->root()))));
+ filter::InstalledAtRoot(env->preferred_root_key()->value()))));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
throw NoSuchPackageError(q);
@@ -143,7 +143,7 @@ do_contents(const std::shared_ptr<Environment> & env)
{
cerr << " Looking for suggestions:" << endl;
- FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->root()));
+ FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->preferred_root_key()->value()));
if (f.begin() == f.end())
cerr << "No suggestions found." << endl;
diff --git a/src/clients/paludis/do_executables.cc b/src/clients/paludis/do_executables.cc
index 406decb0d..5a242427f 100644
--- a/src/clients/paludis/do_executables.cc
+++ b/src/clients/paludis/do_executables.cc
@@ -136,10 +136,10 @@ do_one_executables(
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_allow_wildcards,
- filter::InstalledAtRoot(env->root()))));
+ filter::InstalledAtRoot(env->preferred_root_key()->value()))));
std::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]);
if (entries->empty())
throw NoSuchPackageError(q);
@@ -195,7 +195,7 @@ do_executables(const std::shared_ptr<Environment> & env)
{
cerr << " Looking for suggestions:" << endl;
- FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->root()));
+ FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->preferred_root_key()->value()));
if (f.begin() == f.end())
cerr << "No suggestions found." << endl;
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index fbbdc5736..5a6b50226 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -225,7 +225,7 @@ int do_one_info(
std::shared_ptr<const PackageIDSequence>
entries((*env)[selection::AllVersionsSorted(generator::Matches(*spec, { }))]),
installed_entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->root()))]),
+ generator::Matches(*spec, { }) | filter::InstalledAtRoot(env->preferred_root_key()->value()))]),
installable_entries((*env)[selection::AllVersionsSorted(
generator::Matches(*spec, { }) | filter::SupportsAction<InstallAction>() | filter::NotMasked())]);
diff --git a/src/clients/paludis/uninstall.cc b/src/clients/paludis/uninstall.cc
index ae63b9350..45fa16835 100644
--- a/src/clients/paludis/uninstall.cc
+++ b/src/clients/paludis/uninstall.cc
@@ -30,6 +30,7 @@
#include <paludis/generator.hh>
#include <paludis/selection.hh>
#include <paludis/filter.hh>
+#include <paludis/metadata_key.hh>
#include <iostream>
#include <limits>
@@ -306,7 +307,7 @@ namespace
try
{
- FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->root()));
+ FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->preferred_root_key()->value()));
if (f.begin() == f.end())
cerr << "No suggestions found." << endl;