aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 14:20:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 20:52:24 +0100
commite52571861104efe6139b78b22557211f08025f11 (patch)
tree634bec98491886d12f8f5a25b24f4cacf8d69de5 /paludis/repositories/virtuals
parent80bf4ad14bfd8ab74a9c0d5f203ad5a370351def (diff)
downloadpaludis-e52571861104efe6139b78b22557211f08025f11.tar.gz
paludis-e52571861104efe6139b78b22557211f08025f11.tar.xz
Revert the package dep spec changes
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/package_id.cc23
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc4
2 files changed, 14 insertions, 13 deletions
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 419c7bf94..964792544 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -20,7 +20,6 @@
#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>
@@ -29,12 +28,11 @@
#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>
-#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>
@@ -44,9 +42,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;
@@ -72,15 +70,18 @@ namespace paludis
labels(l),
spec(exact ?
std::make_shared<PackageDepSpec>(
- MutablePackageDepSpecData({ })
- .require_package(v->name())
- .require_version(vrc_and, vo_equal, v->version())
- .require_exact_slot(v->slot_key() ? v->slot_key()->parse_value() : SlotName("UNKNOWN"), false)
- .require_in_repository(v->repository_name()))
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(v->name())
+ .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()->parse_value() : SlotName("UNKNOWN")))
+ .in_repository(v->repository_name()))
:
std::make_shared<PackageDepSpec>(
- MutablePackageDepSpecData({ })
- .require_package(v->name())
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(v->name())
)
),
raw_name(r),
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 6448be6ef..1aa80ccf4 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/dep_spec_data.hh>
+#include <paludis/partially_made_package_dep_spec.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>(MutablePackageDepSpecData({ }).require_package((*p).provided_by()->name())))));
+ std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
}
std::sort(_imp->names.begin(), _imp->names.end(), NamesSortComparator());