aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals/package_id.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-05 12:25:42 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-05 01:33:54 +0000
commita0a35b8d0dd4ca00c91350e3d3acf1bc6208cad1 (patch)
tree83a8c5994577da21ed70242add8e4cf041ee554c /paludis/repositories/virtuals/package_id.cc
parent23d144895a2c80a2f3ff6cd7aa9d94705394ca04 (diff)
downloadpaludis-a0a35b8d0dd4ca00c91350e3d3acf1bc6208cad1.tar.gz
paludis-a0a35b8d0dd4ca00c91350e3d3acf1bc6208cad1.tar.xz
Make slot a metadata key.
Fixes: ticket:450
Diffstat (limited to 'paludis/repositories/virtuals/package_id.cc')
-rw-r--r--paludis/repositories/virtuals/package_id.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 99654af27..e3334ccfb 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -72,7 +72,8 @@ namespace paludis
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
value_for<n::version_spec>(v->version())))
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(v->slot())))
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(
+ v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN"))))
.in_repository(v->repository()->name())))
:
make_shared_ptr(new PackageDepSpec(
@@ -249,12 +250,6 @@ VirtualsPackageID::version() const
return _imp->version;
}
-const SlotName
-VirtualsPackageID::slot() const
-{
- return _imp->virtual_for->value()->slot();
-}
-
const std::tr1::shared_ptr<const Repository>
VirtualsPackageID::repository() const
{
@@ -527,6 +522,12 @@ VirtualsPackageID::fs_location_key() const
return std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
+const std::tr1::shared_ptr<const MetadataValueKey<SlotName> >
+VirtualsPackageID::slot_key() const
+{
+ return _imp->virtual_for->value()->slot_key();
+}
+
const std::tr1::shared_ptr<const MetadataValueKey<bool> >
VirtualsPackageID::transient_key() const
{