aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clients/cave/cmd_digest.cc2
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc10
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc14
-rw-r--r--src/clients/cave/cmd_fix_linkage.cc6
-rw-r--r--src/clients/cave/cmd_graph_jobs.cc14
-rw-r--r--src/clients/cave/cmd_print_spec.cc58
-rw-r--r--src/clients/cave/cmd_report.cc4
-rw-r--r--src/clients/cave/cmd_show.cc12
-rw-r--r--src/clients/cave/resolve_common.cc2
9 files changed, 61 insertions, 61 deletions
diff --git a/src/clients/cave/cmd_digest.cc b/src/clients/cave/cmd_digest.cc
index dbfcd0f6d..c78379fe5 100644
--- a/src/clients/cave/cmd_digest.cc
+++ b/src/clients/cave/cmd_digest.cc
@@ -116,7 +116,7 @@ DigestCommand::run(
throw args::DoHelp("digest takes exactly two parameters");
RepositoryName repo(*next(cmdline.begin_parameters()));
- Filter repo_filter(filter::Matches(MutablePackageDepSpecData({ }).constrain_in_repository(repo), make_null_shared_ptr(), { }));
+ Filter repo_filter(filter::Matches(MutablePackageDepSpecData({ }).require_in_repository(repo), make_null_shared_ptr(), { }));
QualifiedPackageName pkg(std::string::npos == cmdline.begin_parameters()->find('/') ?
env->fetch_unique_qualified_package_name(PackageNamePart(*cmdline.begin_parameters()), repo_filter) :
QualifiedPackageName(*cmdline.begin_parameters()));
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 6f1ba4d9a..cf007d71e 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -79,7 +79,7 @@
#include <paludis/changed_choices.hh>
#include <paludis/mask_utils.hh>
#include <paludis/dep_spec_annotations.hh>
-#include <paludis/package_dep_spec_constraint.hh>
+#include <paludis/package_dep_spec_requirement.hh>
#include <set>
#include <iterator>
@@ -1421,12 +1421,12 @@ namespace
cout << fuc(fs_unable_unsuitable_did_not_meet(), fv<'s'>(s));
- if ((*c)->spec().if_package() && (*c)->spec().if_package()->all_choice_constraints() &&
+ if ((*c)->spec().if_package() && (*c)->spec().if_package()->all_choice_requirements() &&
(! match_package(*env, *(*c)->spec().if_package(), u->package_id(), (*c)->from_id(), { })) &&
- match_package(*env, *(*c)->spec().if_package(), u->package_id(), (*c)->from_id(), { mpo_ignore_choice_constraints }))
+ match_package(*env, *(*c)->spec().if_package(), u->package_id(), (*c)->from_id(), { mpo_ignore_choice_requirements }))
{
- for (auto a((*c)->spec().if_package()->all_choice_constraints()->begin()),
- a_end((*c)->spec().if_package()->all_choice_constraints()->end()) ;
+ for (auto a((*c)->spec().if_package()->all_choice_requirements()->begin()),
+ a_end((*c)->spec().if_package()->all_choice_requirements()->end()) ;
a != a_end ; ++a)
{
const std::pair<bool, std::string> p((*a)->requirement_met(env.get(), 0, u->package_id(), (*c)->from_id(), 0));
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index bcf30bc87..ac530c10d 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -84,7 +84,7 @@
#include <paludis/filter.hh>
#include <paludis/elike_blocker.hh>
#include <paludis/repository.hh>
-#include <paludis/package_dep_spec_constraint.hh>
+#include <paludis/package_dep_spec_requirement.hh>
#include <set>
#include <iterator>
@@ -328,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_name_constraint()->name() != (*replacing_ids->begin())->name())
+ else if (id_specs->empty() || id_specs->begin()->package_name_requirement()->name() != (*replacing_ids->begin())->name())
r.append(stringify(**replacing_ids->begin()));
else
r.append((*replacing_ids->begin())->canonical_form(idcf_no_name));
@@ -685,20 +685,20 @@ namespace
PackageDepSpec spec(parse_user_package_dep_spec(std::get<2>(p), env.get(), { updso_no_disambiguation }));
if (package_dep_spec_has_properties(spec, make_named_values<PackageDepSpecProperties>(
- n::has_any_slot_constraint() = false,
+ n::has_any_slot_requirement() = false,
n::has_category_name_part() = false,
- n::has_choice_constraints() = false,
- n::has_exact_slot_constraint() = false,
+ n::has_choice_requirements() = false,
+ n::has_exact_slot_requirement() = false,
n::has_from_repository() = false,
n::has_in_repository() = false,
n::has_installable_to_path() = false,
n::has_installable_to_repository() = false,
n::has_installed_at_path() = false,
- n::has_key_constraints() = false,
+ n::has_key_requirements() = false,
n::has_package() = true,
n::has_package_name_part() = false,
n::has_tag() = indeterminate,
- n::has_version_constraints() = false
+ n::has_version_requirements() = false
)))
{
any = true;
diff --git a/src/clients/cave/cmd_fix_linkage.cc b/src/clients/cave/cmd_fix_linkage.cc
index dc340c595..b95eb4384 100644
--- a/src/clients/cave/cmd_fix_linkage.cc
+++ b/src/clients/cave/cmd_fix_linkage.cc
@@ -209,12 +209,12 @@ FixLinkageCommand::run(
}
MutablePackageDepSpecData part_spec({ });
- part_spec.constrain_package((*pkg_it)->name());
+ part_spec.require_package((*pkg_it)->name());
if ((*pkg_it)->slot_key())
- part_spec.constrain_exact_slot((*pkg_it)->slot_key()->value(), false);
+ part_spec.require_exact_slot((*pkg_it)->slot_key()->value(), false);
if (cmdline.a_exact.specified())
- part_spec.constrain_version(vcc_and, vo_equal, (*pkg_it)->version());
+ part_spec.require_version(vrc_and, vo_equal, (*pkg_it)->version());
targets->push_back(std::make_pair(stringify(PackageDepSpec(part_spec)), join(broken_files.begin(), broken_files.end(), ", ")));
}
diff --git a/src/clients/cave/cmd_graph_jobs.cc b/src/clients/cave/cmd_graph_jobs.cc
index ff47d9905..34ba7d7d8 100644
--- a/src/clients/cave/cmd_graph_jobs.cc
+++ b/src/clients/cave/cmd_graph_jobs.cc
@@ -42,7 +42,7 @@
#include <paludis/serialise-impl.hh>
#include <paludis/dep_spec.hh>
#include <paludis/name.hh>
-#include <paludis/package_dep_spec_constraint.hh>
+#include <paludis/package_dep_spec_requirement.hh>
#include <iostream>
#include <cstdlib>
@@ -91,15 +91,15 @@ namespace
std::string short_spec(const PackageDepSpec & p, bool full)
{
- if (full || ! p.package_name_constraint())
+ if (full || ! p.package_name_requirement())
return stringify(p);
else
{
- std::string result(stringify(p.package_name_constraint()->name().package()));
- if (p.exact_slot_constraint())
- result = result + ":" + stringify(p.exact_slot_constraint()->name());
- if (p.in_repository_constraint())
- result = result + "::" + stringify(p.in_repository_constraint()->name());
+ std::string result(stringify(p.package_name_requirement()->name().package()));
+ if (p.exact_slot_requirement())
+ result = result + ":" + stringify(p.exact_slot_requirement()->name());
+ if (p.in_repository_requirement())
+ result = result + "::" + stringify(p.in_repository_requirement()->name());
return result;
}
}
diff --git a/src/clients/cave/cmd_print_spec.cc b/src/clients/cave/cmd_print_spec.cc
index 03df2026b..b984ad062 100644
--- a/src/clients/cave/cmd_print_spec.cc
+++ b/src/clients/cave/cmd_print_spec.cc
@@ -126,38 +126,38 @@ namespace
if (cmdline.a_package.specified())
{
- s.unconstrain_package();
- s.unconstrain_package_name_part();
- s.unconstrain_category_name_part();
+ s.unrequire_package();
+ s.unrequire_package_name_part();
+ s.unrequire_category_name_part();
if (! cmdline.a_package.argument().empty())
- s.constrain_package(QualifiedPackageName(cmdline.a_package.argument()));
+ s.require_package(QualifiedPackageName(cmdline.a_package.argument()));
}
if (cmdline.a_slot_requirement.specified())
{
- s.unconstrain_exact_slot();
- s.unconstrain_any_slot();
+ s.unrequire_exact_slot();
+ s.unrequire_any_slot();
if (! cmdline.a_slot_requirement.argument().empty())
- s.constrain_exact_slot(SlotName(cmdline.a_slot_requirement.argument()), false);
+ s.require_exact_slot(SlotName(cmdline.a_slot_requirement.argument()), false);
}
if (cmdline.a_in_repository.specified())
{
- s.unconstrain_in_repository();
+ s.unrequire_in_repository();
if (! cmdline.a_in_repository.argument().empty())
- s.constrain_in_repository(RepositoryName(cmdline.a_in_repository.argument()));
+ s.require_in_repository(RepositoryName(cmdline.a_in_repository.argument()));
}
if (cmdline.a_from_repository.specified())
{
- s.unconstrain_from_repository();
+ s.unrequire_from_repository();
if (! cmdline.a_from_repository.argument().empty())
- s.constrain_from_repository(RepositoryName(cmdline.a_from_repository.argument()));
+ s.require_from_repository(RepositoryName(cmdline.a_from_repository.argument()));
}
if (cmdline.a_installable_to_repository.specified())
{
- s.unconstrain_installable_to_repository();
+ s.unrequire_installable_to_repository();
if (! cmdline.a_installable_to_repository.argument().empty())
{
std::string repo(cmdline.a_installable_to_repository.argument());
@@ -168,20 +168,20 @@ namespace
include_masked = true;
}
- s.constrain_installable_to_repository(RepositoryName(repo), include_masked);
+ s.require_installable_to_repository(RepositoryName(repo), include_masked);
}
}
if (cmdline.a_installed_at_path.specified())
{
- s.unconstrain_installed_at_path();
+ s.unrequire_installed_at_path();
if (! cmdline.a_installed_at_path.argument().empty())
- s.constrain_installed_at_path(FSPath(cmdline.a_installed_at_path.argument()));
+ s.require_installed_at_path(FSPath(cmdline.a_installed_at_path.argument()));
}
if (cmdline.a_installable_to_path.specified())
{
- s.unconstrain_installable_to_path();
+ s.unrequire_installable_to_path();
if (! cmdline.a_installable_to_path.argument().empty())
{
std::string path(cmdline.a_installable_to_path.argument());
@@ -192,43 +192,43 @@ namespace
include_masked = true;
}
- s.constrain_installable_to_path(FSPath(path), include_masked);
+ s.require_installable_to_path(FSPath(path), include_masked);
}
}
if (cmdline.a_package_part.specified() || cmdline.a_category_part.specified())
{
- s.unconstrain_package();
- s.unconstrain_package_name_part();
- s.unconstrain_category_name_part();
+ s.unrequire_package();
+ s.unrequire_package_name_part();
+ s.unrequire_category_name_part();
}
if (cmdline.a_package_part.specified())
{
if (! cmdline.a_package_part.argument().empty())
- s.constrain_package_name_part(PackageNamePart(cmdline.a_package_part.argument()));
+ s.require_package_name_part(PackageNamePart(cmdline.a_package_part.argument()));
}
if (cmdline.a_category_part.specified())
{
if (! cmdline.a_category_part.argument().empty())
- s.constrain_category_name_part(CategoryNamePart(cmdline.a_category_part.argument()));
+ s.require_category_name_part(CategoryNamePart(cmdline.a_category_part.argument()));
}
- VersionConstraintCombiner vcc(vcc_and);
+ VersionRequirementCombiner vrc(vrc_and);
if (cmdline.a_version_requirements_mode.specified())
{
if (cmdline.a_version_requirements_mode.argument() == "and")
- vcc = vcc_and;
+ vrc = vrc_and;
else if (cmdline.a_version_requirements_mode.argument() == "or")
- vcc = vcc_or;
+ vrc = vrc_or;
else
throw args::DoHelp("Argument for --" + cmdline.a_version_requirements_mode.long_name() + " unrecognised");
}
if (cmdline.a_version_requirement.specified())
{
- s.unconstrain_versions();
+ s.unrequire_versions();
for (args::StringSetArg::ConstIterator a(cmdline.a_version_requirement.begin_args()),
a_end(cmdline.a_version_requirement.end_args()) ;
@@ -240,13 +240,13 @@ namespace
throw args::DoHelp("--" + cmdline.a_version_requirement.long_name() + " arguments should be in the form =1.23");
std::string op(a->substr(0, p)), ver(a->substr(p));
- s.constrain_version(vcc, VersionOperator(op), VersionSpec(ver, {}));
+ s.require_version(vrc, VersionOperator(op), VersionSpec(ver, {}));
}
}
if (cmdline.a_additional_requirement.specified())
{
- s.unconstrain_choices();
+ s.unrequire_choices();
for (args::StringSetArg::ConstIterator a(cmdline.a_additional_requirement.begin_args()),
a_end(cmdline.a_additional_requirement.end_args()) ;
@@ -254,7 +254,7 @@ namespace
if (! a->empty())
{
auto k(parse_elike_use_requirement(*a, { }));
- s.constrain_choice(k);
+ s.require_choice(k);
}
}
diff --git a/src/clients/cave/cmd_report.cc b/src/clients/cave/cmd_report.cc
index 78c75c77d..fb34c37f2 100644
--- a/src/clients/cave/cmd_report.cc
+++ b/src/clients/cave/cmd_report.cc
@@ -107,8 +107,8 @@ namespace
auto ids((*env)[selection::BestVersionOnly((
generator::InRepository(RepositoryName(*r)) &
generator::Matches(MutablePackageDepSpecData({ })
- .constrain_package(id->name())
- .constrain_version(vcc_and, vo_equal, id->version()),
+ .require_package(id->name())
+ .require_version(vrc_and, vo_equal, id->version()),
make_null_shared_ptr(), { })) |
filter::SupportsAction<InstallAction>())]);
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 11c197441..f3c070495 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -242,7 +242,7 @@ namespace
for (PackageIDSequence::ConstIterator i(names->begin()), i_end(names->end()) ;
i != i_end ; ++i)
{
- PackageDepSpec name_spec(MutablePackageDepSpecData({ }).constrain_package((*i)->name()));
+ PackageDepSpec name_spec(MutablePackageDepSpecData({ }).require_package((*i)->name()));
cout << fuc(select_format_for_spec(env, name_spec, make_null_shared_ptr(),
fs_wildcard_spec_installed(),
fs_wildcard_spec_installable(),
@@ -1327,8 +1327,8 @@ namespace
{
auto r_ids((*env)[selection::AllVersionsGroupedBySlot(generator::Matches(
MutablePackageDepSpecData(*s.data())
- .unconstrain_in_repository()
- .constrain_in_repository(*r), make_null_shared_ptr(), { }))]);
+ .unrequire_in_repository()
+ .require_in_repository(*r), make_null_shared_ptr(), { }))]);
if (! r_ids->empty())
do_one_package_with_ids(cmdline, env, basic_ppos, s, r_ids, cout, rest_out);
}
@@ -1356,8 +1356,8 @@ namespace
for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
i != i_end ; ++i)
do_one_package(cmdline, env, basic_ppos, MutablePackageDepSpecData(*s.data())
- .unconstrain_package()
- .constrain_package((*i)->name()));
+ .unrequire_package()
+ .require_package((*i)->name()));
}
}
@@ -1399,7 +1399,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_name_constraint()))
+ if ((! spec.package_name_requirement()))
do_one_wildcard(env, spec);
else
do_one_package(cmdline, env, basic_ppos, spec);
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 9524e0b49..878b6bd63 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -1126,7 +1126,7 @@ paludis::cave::resolve_common(
if ('!' != t->at(0) && std::string::npos != t->find('/'))
{
PackageDepSpec ts(parse_spec_with_nice_error(*t, env.get(), { }, filter::All()));
- if (ts.all_version_constraints() && ! ts.all_version_constraints()->empty())
+ if (ts.all_version_requirements() && ! ts.all_version_requirements()->empty())
{
confirm_helper.add_permit_downgrade_spec(ts);
confirm_helper.add_permit_old_version_spec(ts);