aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-24 11:40:46 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-24 11:40:46 +0100
commit637a8d521b304dec1ec4db201d5d71d509efb6c1 (patch)
treefa4f7f5b0537c7f7361e4d76341b53d121c5d003 /paludis/repositories/virtuals
parentd3b974490cf7482b034f1a6779b65e411616f84c (diff)
downloadpaludis-637a8d521b304dec1ec4db201d5d71d509efb6c1.tar.gz
paludis-637a8d521b304dec1ec4db201d5d71d509efb6c1.tar.xz
Make use of Options init lists
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/package_id.cc6
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc14
3 files changed, 11 insertions, 11 deletions
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 1e02917d1..f6f6c8fd0 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -132,10 +132,10 @@ VirtualsDepKey::pretty_print(const DependencySpecTree::ItemFormatter & f) const
{
if (_imp->env)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->spec, MatchPackageOptions()) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->spec, { }) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
return f.format(*_imp->spec, format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->spec, MatchPackageOptions()) |
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->spec, { }) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
return f.format(*_imp->spec, format::Installable());
else
@@ -252,7 +252,7 @@ VirtualsPackageID::uniquely_identifying_spec() const
return parse_user_package_dep_spec("=" + stringify(name()) + "-" + stringify(version()) +
(slot_key() ? ":" + stringify(slot_key()->value()) : "") + "::" + stringify(repository()->name()) +
"[." + _imp->virtual_for->raw_name() + "=" + stringify(*_imp->virtual_for->value()) + "]",
- _imp->env, UserPackageDepSpecOptions());
+ _imp->env, { });
}
const QualifiedPackageName
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 60401d9cb..2adc86b05 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -222,7 +222,7 @@ VirtualsRepository::need_ids() const
v(_imp->names.begin()), v_end(_imp->names.end()) ; v != v_end ; ++v)
{
std::shared_ptr<const PackageIDSequence> matches((*_imp->env)[selection::AllVersionsSorted(
- generator::Matches(*v->second, MatchPackageOptions()) |
+ generator::Matches(*v->second, { }) |
filter::SupportsAction<InstallAction>())]);
if (matches->empty())
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index 5d5525ae7..48cbbe15a 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -71,7 +71,7 @@ namespace test_cases
repo->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
repo->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, { })));
TEST_CHECK(bool(repo->virtual_packages()));
TEST_CHECK_EQUAL(std::distance(repo->virtual_packages()->begin(), repo->virtual_packages()->end()), 1);
@@ -117,14 +117,14 @@ namespace test_cases
repo1->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, { })));
repo1->add_virtual_package(QualifiedPackageName("virtual/foo"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, { })));
repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, { })));
repo2->add_virtual_package(QualifiedPackageName("virtual/foo"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec("<=cat/pkg-1", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec("<=cat/pkg-1", &env, { })));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
@@ -161,11 +161,11 @@ namespace test_cases
repo1->add_version("virtual", "gkp", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec("virtual/gkp", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec("virtual/gkp", &env, { })));
repo2->add_version("virtual", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
- parse_user_package_dep_spec("virtual/pkg", &env, UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec("virtual/pkg", &env, { })));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));