aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_repository_sets.cc9
-rw-r--r--paludis/repositories/e/vdb_repository.cc7
-rw-r--r--paludis/repositories/gemcutter/gemcutter_dependencies_key.cc6
-rw-r--r--paludis/repositories/virtuals/package_id.cc6
4 files changed, 10 insertions, 18 deletions
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index d9f15fe01..2f5736042 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -37,7 +37,6 @@
#include <paludis/set_file.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/version_operator.hh>
-#include <paludis/version_requirements.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/is_file_with_extension.hh>
@@ -296,9 +295,7 @@ ERepositorySets::security_set(bool insecurity) const
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(
make_package_dep_spec({ })
.package((*c)->name())
- .version_requirement(make_named_values<VersionRequirement>(
- n::version_operator() = vo_equal,
- n::version_spec() = (*c)->version()))
+ .version_constraint((*c)->version(), vo_equal, vcc_and)
.in_repository((*c)->repository_name())));
security_packages->top()->append(spec);
}
@@ -328,9 +325,7 @@ ERepositorySets::security_set(bool insecurity) const
std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(make_package_dep_spec({ })
.package((*r)->name())
- .version_requirement(make_named_values<VersionRequirement>(
- n::version_operator() = vo_equal,
- n::version_spec() = (*r)->version()))
+ .version_constraint((*r)->version(), vo_equal, vcc_and)
.in_repository((*r)->repository_name())));
security_packages->top()->append(spec);
ok = true;
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 1a70d48db..a6b9a91ba 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -45,7 +45,6 @@
#include <paludis/repository_name_cache.hh>
#include <paludis/set_file.hh>
#include <paludis/version_operator.hh>
-#include <paludis/version_requirements.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
#include <paludis/filtered_generator.hh>
@@ -1111,7 +1110,11 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
IDMap::iterator i(_imp->ids.find(p.package_name_constraint()->name()));
if (_imp->ids.end() == i)
i = _imp->ids.insert(std::make_pair(p.package_name_constraint()->name(), std::make_shared<PackageIDSequence>())).first;
- i->second->push_back(make_id(p.package_name_constraint()->name(), p.version_requirements_ptr()->begin()->version_spec(), *d));
+
+ if ((! bool(p.all_version_constraints())) || (std::distance(p.all_version_constraints()->begin(), p.all_version_constraints()->end()) != 1))
+ throw InternalError(PALUDIS_HERE, "didn't get a single version constraint");
+
+ i->second->push_back(make_id(p.package_name_constraint()->name(), (*p.all_version_constraints()->begin())->version_spec(), *d));
}
catch (const InternalError &)
{
diff --git a/paludis/repositories/gemcutter/gemcutter_dependencies_key.cc b/paludis/repositories/gemcutter/gemcutter_dependencies_key.cc
index 8cfb1210d..c5a77f873 100644
--- a/paludis/repositories/gemcutter/gemcutter_dependencies_key.cc
+++ b/paludis/repositories/gemcutter/gemcutter_dependencies_key.cc
@@ -36,7 +36,6 @@
#include <paludis/generator.hh>
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
-#include <paludis/version_requirements.hh>
#include <paludis/version_operator.hh>
#include <paludis/version_spec.hh>
#include <paludis/pretty_printer.hh>
@@ -175,10 +174,7 @@ namespace
return make_shared_copy(PackageDepSpec(make_package_dep_spec({ pmpdso_always_use_ranged_deps })
.package(QualifiedPackageName("gem/" + dep.name()))
- .version_requirement(make_named_values<VersionRequirement>(
- n::version_operator() = op,
- n::version_spec() = ver
- ))
+ .version_constraint(ver, op, vcc_and)
));
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index f4f48a42f..253466eb6 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -31,8 +31,8 @@
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_spec.hh>
+#include <paludis/version_operator.hh>
#include <paludis/environment.hh>
-#include <paludis/version_requirements.hh>
#include <paludis/metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/mask.hh>
@@ -72,9 +72,7 @@ namespace paludis
std::make_shared<PackageDepSpec>(
make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(v->name())
- .version_requirement(make_named_values<VersionRequirement>(
- n::version_operator() = vo_equal,
- n::version_spec() = v->version()))
+ .version_constraint(v->version(), vo_equal, vcc_and)
.exact_slot_constraint(v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN"), false)
.in_repository(v->repository_name()))
: