aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-30 11:37:31 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:32:59 +0100
commit28626b8aa3b39d400f8f9eb3a0730ac101b2e53a (patch)
treec60cfb02dcee2efcf7045ccfd53316e5a8fe94a8 /paludis/repositories
parenta004eeed5dda3432dcb1a4c0a865ae24daae4fd3 (diff)
downloadpaludis-28626b8aa3b39d400f8f9eb3a0730ac101b2e53a.tar.gz
paludis-28626b8aa3b39d400f8f9eb3a0730ac101b2e53a.tar.xz
slot to requirements
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_repository_sets.cc1
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc13
-rw-r--r--paludis/repositories/virtuals/package_id.cc3
3 files changed, 6 insertions, 11 deletions
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 186b28b61..d9f15fe01 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -26,7 +26,6 @@
#include <paludis/action-fwd.hh>
#include <paludis/dep_spec.hh>
-#include <paludis/elike_slot_requirement.hh>
#include <paludis/environment.hh>
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index bb613609b..1f952e271 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -28,13 +28,13 @@
#include <paludis/dep_spec.hh>
#include <paludis/environment.hh>
#include <paludis/package_id.hh>
-#include <paludis/elike_slot_requirement.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
#include <paludis/metadata_key.hh>
#include <paludis/partially_made_package_dep_spec.hh>
+#include <paludis/package_dep_spec_constraint.hh>
#include <functional>
#include <algorithm>
#include <list>
@@ -99,11 +99,7 @@ namespace
do
{
- if (! node.spec()->slot_requirement_ptr())
- break;
-
- const SlotAnyLockedRequirement * const r(visitor_cast<const SlotAnyLockedRequirement>(*node.spec()->slot_requirement_ptr()));
- if (! r)
+ if ((! node.spec()->any_slot_constraint()) || (! node.spec()->any_slot_constraint()->locking()))
break;
std::shared_ptr<const PackageIDSequence> matches((*env)[selection::AllVersionsSorted(
@@ -113,8 +109,9 @@ namespace
if ((*matches->last())->slot_key())
{
- PackageDepSpec new_s(PartiallyMadePackageDepSpec(*node.spec()).slot_requirement(
- std::make_shared<ELikeSlotExactRequirement>((*matches->last())->slot_key()->value(), true)));
+ PackageDepSpec new_s(PartiallyMadePackageDepSpec(*node.spec())
+ .clear_any_slot()
+ .exact_slot_constraint((*matches->last())->slot_key()->value(), true));
c = std::make_shared<PackageDepSpec>(new_s);
}
} while (false);
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index a2231e576..f4f48a42f 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -75,8 +75,7 @@ namespace paludis
.version_requirement(make_named_values<VersionRequirement>(
n::version_operator() = vo_equal,
n::version_spec() = v->version()))
- .slot_requirement(std::make_shared<UserSlotExactRequirement>(
- v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN")))
+ .exact_slot_constraint(v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN"), false)
.in_repository(v->repository_name()))
:
std::make_shared<PackageDepSpec>(