aboutsummaryrefslogtreecommitdiff
path: root/src/clients
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-28 23:44:02 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:32:58 +0100
commitb7f5d7dbfeff2e406ef24ca471657e1735a4db4f (patch)
treec1af04c563afeff3b8410022f1cd9079299dd6ce /src/clients
parent968efa61fa4abe5349ffc453ac46087867eaa29b (diff)
downloadpaludis-b7f5d7dbfeff2e406ef24ca471657e1735a4db4f.tar.gz
paludis-b7f5d7dbfeff2e406ef24ca471657e1735a4db4f.tar.xz
Start using constraints for PackageDepSpecs
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc7
-rw-r--r--src/clients/cave/cmd_graph_jobs.cc9
-rw-r--r--src/clients/cave/cmd_show.cc2
3 files changed, 14 insertions, 4 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index b9b71c12c..895be311e 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -25,8 +25,10 @@
#include "colours.hh"
#include "resume_data.hh"
#include "format_user_config.hh"
+
#include <paludis/args/do_help.hh>
#include <paludis/args/escape.hh>
+
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
#include <paludis/util/system.hh>
@@ -48,6 +50,7 @@
#include <paludis/util/timestamp.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/process.hh>
+
#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
@@ -62,6 +65,7 @@
#include <paludis/resolver/job.hh>
#include <paludis/resolver/job_state.hh>
#include <paludis/resolver/job_requirements.hh>
+
#include <paludis/package_id.hh>
#include <paludis/version_spec.hh>
#include <paludis/metadata_key.hh>
@@ -80,6 +84,7 @@
#include <paludis/filter.hh>
#include <paludis/elike_blocker.hh>
#include <paludis/repository.hh>
+#include <paludis/package_dep_spec_constraint.hh>
#include <set>
#include <iterator>
@@ -323,7 +328,7 @@ namespace
const auto replacing_ids((*env)[selection::BestVersionOnly(generator::Matches(*i, make_null_shared_ptr(), { }))]);
if (replacing_ids->empty())
r.append(stringify(*i));
- else if (id_specs->empty() || *id_specs->begin()->package_ptr() != (*replacing_ids->begin())->name())
+ else if (id_specs->empty() || id_specs->begin()->package_name_constraint()->name() != (*replacing_ids->begin())->name())
r.append(stringify(**replacing_ids->begin()));
else
r.append((*replacing_ids->begin())->canonical_form(idcf_no_name));
diff --git a/src/clients/cave/cmd_graph_jobs.cc b/src/clients/cave/cmd_graph_jobs.cc
index 5583422b7..2d1019b3e 100644
--- a/src/clients/cave/cmd_graph_jobs.cc
+++ b/src/clients/cave/cmd_graph_jobs.cc
@@ -21,7 +21,9 @@
#include "resolve_cmdline.hh"
#include "exceptions.hh"
#include "command_command_line.hh"
+
#include <paludis/args/do_help.hh>
+
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_shared_copy.hh>
@@ -31,13 +33,16 @@
#include <paludis/util/fs_path.hh>
#include <paludis/util/join.hh>
#include <paludis/util/process.hh>
+
#include <paludis/resolver/job_list.hh>
#include <paludis/resolver/job_lists.hh>
#include <paludis/resolver/job.hh>
#include <paludis/resolver/job_requirements.hh>
+
#include <paludis/serialise-impl.hh>
#include <paludis/dep_spec.hh>
#include <paludis/name.hh>
+#include <paludis/package_dep_spec_constraint.hh>
#include <iostream>
#include <cstdlib>
@@ -86,11 +91,11 @@ namespace
std::string short_spec(const PackageDepSpec & p, bool full)
{
- if (full || ! p.package_ptr())
+ if (full || ! p.package_name_constraint())
return stringify(p);
else
{
- std::string result(stringify(p.package_ptr()->package()));
+ std::string result(stringify(p.package_name_constraint()->name().package()));
if (p.slot_requirement_ptr())
result = result + stringify(*p.slot_requirement_ptr());
if (p.in_repository_ptr())
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index df3017767..a74421c97 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -1392,7 +1392,7 @@ ShowCommand::run(
try
{
PackageDepSpec spec(parse_spec_with_nice_error(*p, env.get(), { updso_throw_if_set, updso_allow_wildcards }, filter::All()));
- if ((! spec.package_ptr()))
+ if ((! spec.package_name_constraint()))
do_one_wildcard(env, spec);
else
do_one_package(cmdline, env, basic_ppos, spec);