aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-05 17:24:42 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-05 19:06:04 +0100
commit0a0afc97925e6c8df3cedd5a4c3dee60a9673785 (patch)
treeebfa071857b3aacd7a4db5dc9bd25c421f505088 /paludis/repositories/virtuals
parent975c0c94b62ff647c8aceab9c4ff62ca4e47142e (diff)
downloadpaludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.gz
paludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.xz
No need for fancy PackageDepSpecData subclassing
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/package_id.cc18
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc4
2 files changed, 12 insertions, 10 deletions
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 253466eb6..f59ce46c6 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -20,6 +20,7 @@
#include <paludis/repositories/virtuals/package_id.hh>
#include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
#include <paludis/repositories/virtuals/virtuals_repository.hh>
+
#include <paludis/util/stringify.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/mutex.hh>
@@ -28,6 +29,7 @@
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/singleton-impl.hh>
+
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_spec.hh>
@@ -42,9 +44,9 @@
#include <paludis/generator.hh>
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
-#include <paludis/partially_made_package_dep_spec.hh>
#include <paludis/always_enabled_dependency_label.hh>
#include <paludis/pretty_printer.hh>
+#include <paludis/dep_spec_data.hh>
using namespace paludis;
using namespace paludis::virtuals;
@@ -70,15 +72,15 @@ namespace paludis
labels(l),
spec(exact ?
std::make_shared<PackageDepSpec>(
- make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
- .package(v->name())
- .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()))
+ MutablePackageDepSpecData({ })
+ .constrain_package(v->name())
+ .constrain_version(vcc_and, vo_equal, v->version())
+ .constrain_exact_slot(v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN"), false)
+ .constrain_in_repository(v->repository_name()))
:
std::make_shared<PackageDepSpec>(
- make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
- .package(v->name())
+ MutablePackageDepSpecData({ })
+ .constrain_package(v->name())
)
),
raw_name(r),
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 1aa80ccf4..62288eaac 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -29,7 +29,7 @@
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
#include <paludis/hook.hh>
-#include <paludis/partially_made_package_dep_spec.hh>
+#include <paludis/dep_spec_data.hh>
#include <paludis/util/log.hh>
#include <paludis/util/operators.hh>
@@ -160,7 +160,7 @@ VirtualsRepository::need_names() const
for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(provides->begin()),
p_end(provides->end()) ; p != p_end ; ++p)
_imp->names.push_back(std::make_pair((*p).virtual_name(), std::shared_ptr<const PackageDepSpec>(
- std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
+ std::make_shared<PackageDepSpec>(MutablePackageDepSpecData({ }).constrain_package((*p).provided_by()->name())))));
}
std::sort(_imp->names.begin(), _imp->names.end(), NamesSortComparator());