aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-14 20:03:26 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-15 10:42:03 +0100
commit7ce6f2a635664f48179ba58b18a24f041d467bc3 (patch)
tree33814a7743ba58a577ea8e996c8e8d777c0f5a57
parent1f5408648013aa4ea8cb70864888274b068402e3 (diff)
downloadpaludis-7ce6f2a635664f48179ba58b18a24f041d467bc3.tar.gz
paludis-7ce6f2a635664f48179ba58b18a24f041d467bc3.tar.xz
Boring API updates for parse_user_package_dep_spec changes (continued)
-rw-r--r--paludis/dep_list_TEST.cc99
-rw-r--r--paludis/dep_list_TEST.hh3
-rw-r--r--paludis/dep_list_TEST_blockers.cc16
-rw-r--r--paludis/dep_spec_TEST.cc5
-rw-r--r--paludis/environments/paludis/keywords_conf.cc3
-rw-r--r--paludis/environments/paludis/licenses_conf.cc3
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc3
-rw-r--r--paludis/environments/paludis/paludis_environment.cc6
-rw-r--r--paludis/environments/paludis/paludis_environment_TEST.cc21
-rw-r--r--paludis/environments/paludis/use_conf.cc3
-rw-r--r--paludis/environments/paludis/world.cc9
-rw-r--r--paludis/environments/portage/portage_environment.cc13
-rw-r--r--paludis/environments/portage/portage_environment_TEST.cc24
-rw-r--r--paludis/filter_TEST.cc3
-rw-r--r--paludis/fuzzy_finder.cc2
-rw-r--r--paludis/generator_TEST.cc16
-rw-r--r--paludis/range_rewriter_TEST.cc8
-rw-r--r--paludis/repositories/e/e_installed_repository.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc206
-rw-r--r--paludis/repositories/e/e_repository_sets.cc3
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc3
-rw-r--r--paludis/repositories/e/qa/visibility_TEST.cc20
-rw-r--r--paludis/repositories/e/vdb_repository.cc3
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc86
-rw-r--r--paludis/repositories/unpackaged/dep_parser.cc4
-rw-r--r--paludis/repositories/unpackaged/dep_parser.hh4
-rw-r--r--paludis/repositories/unpackaged/dep_parser_TEST.cc3
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc24
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc14
-rw-r--r--paludis/selection_TEST.cc88
-rw-r--r--paludis/set_file_TEST.cc19
-rw-r--r--paludis/stringify_formatter_TEST.cc8
-rw-r--r--paludis/uninstall_list_TEST.cc14
-rw-r--r--paludis/user_dep_spec_TEST.cc47
36 files changed, 450 insertions, 340 deletions
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index d04caa5..fb92e6c 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -974,7 +974,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1001,7 +1002,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1068,7 +1070,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1095,7 +1098,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1441,7 +1445,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1498,7 +1503,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1555,7 +1561,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1612,7 +1619,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1665,7 +1673,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1692,7 +1701,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1745,7 +1755,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1772,7 +1783,8 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -1804,11 +1816,13 @@ namespace test_cases
repo->add_version("cat", "seven", "1")->build_dependencies_key()->set_from_string("cat/doesnotexist");
DepList d(&env, DepListOptions());
- d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "),
"cat/four-1:0::repo cat/two-1:0::repo cat/three-1:0::repo cat/one-1:0::repo");
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/five", UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/five",
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "),
@@ -1842,11 +1856,13 @@ namespace test_cases
repo->add_version("cat", "seven", "1")->post_dependencies_key()->set_from_string("cat/doesnotexist");
DepList d(&env, DepListOptions());
- d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "),
"cat/four-1:0::repo cat/two-1:0::repo cat/three-1:0::repo cat/one-1:0::repo");
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/five", UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/five",
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "),
@@ -1876,7 +1892,8 @@ namespace test_cases
installed_repo->add_version("cat", "one", "2");
DepList d(&env, DepListOptions());
- d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "), "cat/one-1:0::repo");
}
} test_dep_list_forced_downgrade_of_installed;
@@ -1903,7 +1920,8 @@ namespace test_cases
DepList d(&env, DepListOptions());
d.options()->fall_back = dl_fall_back_never;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
}
} test_dep_list_fall_back_never;
@@ -1930,8 +1948,10 @@ namespace test_cases
DepList d(&env, DepListOptions());
d.options()->fall_back = dl_fall_back_as_needed;
- d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
- d.add(PackageDepSpec(parse_user_package_dep_spec("cat/two", UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec("cat/two",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d.begin(), d.end(), " "), "cat/two-2:0::installed_repo cat/one-1:0::repo");
}
} test_dep_list_fall_back_as_needed;
@@ -1959,14 +1979,17 @@ namespace test_cases
DepList d1(&env, DepListOptions());
d1.options()->fall_back = dl_fall_back_as_needed_except_targets;
- d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
+ d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/two-2:0::installed_repo cat/one-1:0::repo");
- TEST_CHECK_THROWS(d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/three", UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/three",
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
DepList d2(&env, DepListOptions());
d2.options()->fall_back = dl_fall_back_as_needed_except_targets;
- TEST_CHECK_THROWS(d2.add(PackageDepSpec(parse_user_package_dep_spec("cat/two", UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d2.add(PackageDepSpec(parse_user_package_dep_spec("cat/two",
+ &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
DepList d3(&env, DepListOptions());
@@ -1974,18 +1997,22 @@ namespace test_cases
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > t3(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
t3->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions()))))));
t3->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/two", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/two",
+ &env, UserPackageDepSpecOptions()))))));
TEST_CHECK_THROWS(d3.add(*t3, env.default_destinations()), DepListError);
DepList d4(&env, DepListOptions());
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > t4(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
t4->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions()))))));
t4->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/three", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/three",
+ &env, UserPackageDepSpecOptions()))))));
TEST_CHECK_THROWS(d4.add(*t4, env.default_destinations()), DepListError);
}
} test_dep_list_fall_back_as_needed_not_targets;
@@ -2013,7 +2040,8 @@ namespace test_cases
DepList d1(&env, DepListOptions());
d1.options()->upgrade = dl_upgrade_as_needed;
- d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions())), env.default_destinations());
+ d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/two-0:0::installed_repo cat/one-1:0::repo");
DepList d2(&env, DepListOptions());
@@ -2022,9 +2050,11 @@ namespace test_cases
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > t2(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
t2->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions()))))));
t2->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/two", UserPackageDepSpecOptions()))))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("cat/two",
+ &env, UserPackageDepSpecOptions()))))));
d2.add(*t2, env.default_destinations());
TEST_CHECK_EQUAL(join(d2.begin(), d2.end(), " "), "cat/two-2:0::repo cat/one-1:0::repo");
}
@@ -2064,7 +2094,8 @@ namespace test_cases
DepList d1(&env, DepListOptions());
d1.options()->reinstall_scm = dl_reinstall_scm_always;
- d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/zero", UserPackageDepSpecOptions())), env.default_destinations());
+ d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/zero",
+ &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/one-scm:0::repo cat/two-2:0::installed_repo "
"cat/three-live-0:0::repo cat/four-cvs-0:0::repo cat/five-svn-0:0::repo cat/six-darcs-0:0::repo "
"cat/zero-1:0::repo");
@@ -2095,10 +2126,12 @@ namespace test_cases
DepList d1(&env, DepListOptions());
d1.options()->dependency_tags = true;
- PackageDepSpec with_target_tag(parse_user_package_dep_spec("cat/one", UserPackageDepSpecOptions()));
+ PackageDepSpec with_target_tag(parse_user_package_dep_spec("cat/one",
+ &env, UserPackageDepSpecOptions()));
with_target_tag.set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
d1.add(with_target_tag, env.default_destinations());
- PackageDepSpec with_set_tag(parse_user_package_dep_spec("cat/two", UserPackageDepSpecOptions()));
+ PackageDepSpec with_set_tag(parse_user_package_dep_spec("cat/two",
+ &env, UserPackageDepSpecOptions()));
with_set_tag.set_tag(std::tr1::shared_ptr<const DepTag>(new GeneralSetDepTag(SetName("set"), "test")));
d1.add(with_set_tag, env.default_destinations());
diff --git a/paludis/dep_list_TEST.hh b/paludis/dep_list_TEST.hh
index a095f58..a8a04a2 100644
--- a/paludis/dep_list_TEST.hh
+++ b/paludis/dep_list_TEST.hh
@@ -133,7 +133,8 @@ namespace test_cases
{
DepList d(&env, DepListOptions());
set_options(*d.options());
- d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions() + updso_allow_wildcards)),
+ d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target,
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards)),
env.default_destinations());
TEST_CHECK(true);
diff --git a/paludis/dep_list_TEST_blockers.cc b/paludis/dep_list_TEST_blockers.cc
index 5c13db7..68b6fb0 100644
--- a/paludis/dep_list_TEST_blockers.cc
+++ b/paludis/dep_list_TEST_blockers.cc
@@ -47,12 +47,12 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions()),
+ TEST_CHECK_THROWS(d.add(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions()),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
d.options()->blocks = dl_blocks_accumulate;
- d.add(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions()), env.default_destinations());
+ d.add(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions()), env.default_destinations());
TEST_CHECK_EQUAL(std::distance(d.begin(), d.end()), 2);
TEST_CHECK_EQUAL(d.begin()->kind, dlk_block);
TEST_CHECK_STRINGIFY_EQUAL(*d.begin()->package_id, "cat/two-1:0::installed");
@@ -123,12 +123,12 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
d.options()->blocks = dl_blocks_accumulate;
- d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())), env.default_destinations());
+ d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(std::distance(d.begin(), d.end()), 4);
TEST_CHECK_EQUAL(d.begin()->kind, dlk_block);
TEST_CHECK_STRINGIFY_EQUAL(*d.begin()->package_id, "virtual/two-1::installed-virtuals (virtual for other/two-1:0::installed)");
@@ -162,7 +162,7 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -302,7 +302,7 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -331,7 +331,7 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
@@ -360,7 +360,7 @@ namespace test_cases
TEST_CHECK(true);
DepList d(&env, DepListOptions());
d.options()->blocks = dl_blocks_error;
- TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, UserPackageDepSpecOptions())),
+ TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
}
diff --git a/paludis/dep_spec_TEST.cc b/paludis/dep_spec_TEST.cc
index ba228a7..6861fda 100644
--- a/paludis/dep_spec_TEST.cc
+++ b/paludis/dep_spec_TEST.cc
@@ -28,6 +28,7 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/version_requirements.hh>
+#include <paludis/environments/test/test_environment.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -74,7 +75,9 @@ namespace test_cases
void run()
{
- PackageDepSpec a(parse_user_package_dep_spec("cat/pkg:1::repo[=1|>3.2][foo]", UserPackageDepSpecOptions()));
+ TestEnvironment env;
+ PackageDepSpec a(parse_user_package_dep_spec("cat/pkg:1::repo[=1|>3.2][foo]",
+ &env, UserPackageDepSpecOptions()));
std::tr1::shared_ptr<PackageDepSpec> b(std::tr1::static_pointer_cast<PackageDepSpec>(a.clone()));
TEST_CHECK_STRINGIFY_EQUAL(a, *b);
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index d2e6e16..8720c0d 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -117,7 +117,8 @@ KeywordsConf::add(const FSEntry & filename)
else
{
std::tr1::shared_ptr<PackageDepSpec> d(new PackageDepSpec(parse_user_package_dep_spec(
- tokens.at(0), UserPackageDepSpecOptions() + updso_allow_wildcards)));
+ tokens.at(0), _imp->env,
+ UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation)));
if (d->package_ptr())
{
KeywordsList & k(_imp->qualified[*d->package_ptr()][d]);
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 1d45d0f..53d5c93 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -116,7 +116,8 @@ LicensesConf::add(const FSEntry & filename)
else
{
std::tr1::shared_ptr<PackageDepSpec> d(new PackageDepSpec(parse_user_package_dep_spec(
- tokens.at(0), UserPackageDepSpecOptions() + updso_allow_wildcards)));
+ tokens.at(0), _imp->env,
+ UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation)));
if (d->package_ptr())
{
LicensesList & k(_imp->qualified[*d->package_ptr()][d]);
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index 3eb679b..f0cd0a3 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -86,7 +86,8 @@ PackageMaskConf::add(const FSEntry & filename)
_imp->sets.push_back(std::make_pair(SetName(*line), std::tr1::shared_ptr<const SetSpecTree::ConstItem>()));
else
_imp->masks.push_back(std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec(
- *line, UserPackageDepSpecOptions() + updso_allow_wildcards))));
+ *line, _imp->env,
+ UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation))));
}
}
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 93fd918..8fd2d19 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -372,7 +372,8 @@ PaludisEnvironment::local_set(const SetName & ss) const
SetFile f(SetFileParams::create()
.file_name(dir / (stringify(s.first) + ".bash"))
.type(sft_paludis_bash)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions() + updso_allow_wildcards))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, this,
+ UserPackageDepSpecOptions() + updso_allow_wildcards, filter::All()))
.tag(tag)
.set_operator_mode(s.second)
.environment(this));
@@ -385,7 +386,8 @@ PaludisEnvironment::local_set(const SetName & ss) const
SetFile f(SetFileParams::create()
.file_name(dir / (stringify(s.first) + ".conf"))
.type(sft_paludis_conf)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions() + updso_allow_wildcards))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1,
+ this, UserPackageDepSpecOptions() + updso_allow_wildcards, filter::All()))
.tag(tag)
.set_operator_mode(s.second)
.environment(this));
diff --git a/paludis/environments/paludis/paludis_environment_TEST.cc b/paludis/environments/paludis/paludis_environment_TEST.cc
index 96fb7ad..0216792 100644
--- a/paludis/environments/paludis/paludis_environment_TEST.cc
+++ b/paludis/environments/paludis/paludis_environment_TEST.cc
@@ -50,9 +50,11 @@ namespace test_cases
std::tr1::shared_ptr<Environment> env(new PaludisEnvironment(""));
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(env->query_use(UseFlagName("foo"), *one));
TEST_CHECK(! env->query_use(UseFlagName("foofoo"), *one));
@@ -82,7 +84,8 @@ namespace test_cases
std::tr1::shared_ptr<Environment> env(new PaludisEnvironment(""));
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
std::tr1::shared_ptr<const UseFlagNameSet> k1(env->known_use_expand_names(UseFlagName("foo_cards"), *one));
TEST_CHECK_EQUAL(join(k1->begin(), k1->end(), " "), "foo_cards_one foo_cards_three foo_cards_two");
}
@@ -100,9 +103,11 @@ namespace test_cases
std::tr1::shared_ptr<Environment> env(new PaludisEnvironment(""));
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(env->query_use(UseFlagName("foo"), *one));
TEST_CHECK(! env->query_use(UseFlagName("foofoo"), *one));
@@ -131,9 +136,11 @@ namespace test_cases
std::tr1::shared_ptr<Environment> env(new PaludisEnvironment(""));
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> three(*(*env)[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-3",
+ env.get(), UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(env->query_use(UseFlagName("foo"), *one));
TEST_CHECK(! env->query_use(UseFlagName("foofoo"), *one));
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 22ecbe4..c1a3917 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -134,7 +134,8 @@ UseConf::add(const FSEntry & filename)
else
{
std::tr1::shared_ptr<PackageDepSpec> d(new PackageDepSpec(parse_user_package_dep_spec(
- tokens.at(0), UserPackageDepSpecOptions() + updso_allow_wildcards)));
+ tokens.at(0), _imp->env,
+ UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation)));
if (d->additional_requirements_ptr())
{
diff --git a/paludis/environments/paludis/world.cc b/paludis/environments/paludis/world.cc
index 5359efe..e1a09b0 100644
--- a/paludis/environments/paludis/world.cc
+++ b/paludis/environments/paludis/world.cc
@@ -114,7 +114,8 @@ World::_add_string_to_world(const std::string & n) const
SetFile world(SetFileParams::create()
.file_name(*_imp->maybe_world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(_imp->env));
@@ -143,7 +144,8 @@ World::_remove_string_from_world(const std::string & n) const
SetFile world(SetFileParams::create()
.file_name(*_imp->maybe_world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(_imp->env));
@@ -167,7 +169,8 @@ World::world_set() const
SetFile world(SetFileParams::create()
.file_name(*_imp->maybe_world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(tag)
.set_operator_mode(sfsmo_natural)
.environment(_imp->env));
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 194b8ba..f622ba7 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -326,7 +326,7 @@ PortageEnvironment::_load_atom_file(const FSEntry & f, I_ i, const std::string &
continue;
std::tr1::shared_ptr<PackageDepSpec> p(new PackageDepSpec(parse_user_package_dep_spec(
- tokens.at(0), UserPackageDepSpecOptions())));
+ tokens.at(0), this, UserPackageDepSpecOptions())));
if (reject_additional && p->additional_requirements_ptr())
{
Log::get_instance()->message("portage_environment.bad_spec", ll_warning, lc_context)
@@ -372,7 +372,8 @@ PortageEnvironment::_load_lined_file(const FSEntry & f, I_ i)
for (LineConfigFile::ConstIterator line(file.begin()), line_end(file.end()) ;
line != line_end ; ++line)
*i++ = std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec(strip_trailing(strip_leading(*line, " \t"), " \t"), UserPackageDepSpecOptions())));
+ parse_user_package_dep_spec(strip_trailing(strip_leading(*line, " \t"), " \t"),
+ this, UserPackageDepSpecOptions())));
}
}
@@ -843,7 +844,7 @@ PortageEnvironment::_add_string_to_world(const std::string & s) const
SetFile world(SetFileParams::create()
.file_name(_imp->world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, this, UserPackageDepSpecOptions(), filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(this));
@@ -865,7 +866,8 @@ PortageEnvironment::_remove_string_from_world(const std::string & s) const
SetFile world(SetFileParams::create()
.file_name(_imp->world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, this, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(this));
@@ -891,7 +893,8 @@ PortageEnvironment::world_set() const
SetFile world(SetFileParams::create()
.file_name(_imp->world_file)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, this, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(tag)
.set_operator_mode(sfsmo_natural)
.environment(this));
diff --git a/paludis/environments/portage/portage_environment_TEST.cc b/paludis/environments/portage/portage_environment_TEST.cc
index e53a6d2..40b75e3 100644
--- a/paludis/environments/portage/portage_environment_TEST.cc
+++ b/paludis/environments/portage/portage_environment_TEST.cc
@@ -72,10 +72,12 @@ namespace test_cases
PortageEnvironment env("portage_environment_TEST_dir/query_use");
const std::tr1::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(env.query_use(UseFlagName("one"), *idx));
TEST_CHECK(env.query_use(UseFlagName("two"), *idx));
@@ -100,7 +102,8 @@ namespace test_cases
PortageEnvironment env("portage_environment_TEST_dir/known_use_expand_names");
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
std::tr1::shared_ptr<const UseFlagNameSet> k1(env.known_use_expand_names(UseFlagName("foo_cards"), *id1));
TEST_CHECK_EQUAL(join(k1->begin(), k1->end(), " "), "foo_cards_one foo_cards_three");
}
@@ -115,35 +118,40 @@ namespace test_cases
TestPortageEnvironment env("portage_environment_TEST_dir/accept_keywords");
const std::tr1::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *idx));
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *idx));
TEST_CHECK(! accept_keyword(env, KeywordName("~arch"), *idx));
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *id1));
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *id1));
TEST_CHECK(accept_keyword(env, KeywordName("~arch"), *id1));
const std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *id2));
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *id2));
TEST_CHECK(accept_keyword(env, KeywordName("~arch"), *id2));
const std::tr1::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-three-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-three-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(! accept_keyword(env, KeywordName("other_arch"), *id3));
TEST_CHECK(! accept_keyword(env, KeywordName("arch"), *id3));
TEST_CHECK(! accept_keyword(env, KeywordName("~arch"), *id3));
const std::tr1::shared_ptr<const PackageID> id4(*env[selection::RequireExactlyOne(
- generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-four-1", UserPackageDepSpecOptions()))))]->begin());
+ generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-four-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("fred"), *id4));
}
} test_accept_keywords;
diff --git a/paludis/filter_TEST.cc b/paludis/filter_TEST.cc
index e443ce6..f95929d 100644
--- a/paludis/filter_TEST.cc
+++ b/paludis/filter_TEST.cc
@@ -82,7 +82,8 @@ namespace test_cases
TEST_CHECK_EQUAL(join(indirect_iterator(got->begin()), indirect_iterator(got->end()), ", "), expected);
std::tr1::shared_ptr<const PackageIDSequence> got_none(env[selection::AllVersionsSorted(
- generator::Matches(parse_user_package_dep_spec("not/exist", UserPackageDepSpecOptions())) | filter)]);
+ generator::Matches(parse_user_package_dep_spec("not/exist", &env,
+ UserPackageDepSpecOptions())) | filter)]);
TEST_CHECK(got_none);
TEST_CHECK_EQUAL(join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "), "");
}
diff --git a/paludis/fuzzy_finder.cc b/paludis/fuzzy_finder.cc
index 2511405..856850c 100644
--- a/paludis/fuzzy_finder.cc
+++ b/paludis/fuzzy_finder.cc
@@ -136,7 +136,7 @@ FuzzyCandidatesFinder::FuzzyCandidatesFinder(const Environment & e, const std::s
if (std::string::npos != name.find('/'))
{
- PackageDepSpec pds(parse_user_package_dep_spec(name, UserPackageDepSpecOptions()));
+ PackageDepSpec pds(parse_user_package_dep_spec(name, &e, UserPackageDepSpecOptions()));
if (pds.package_ptr())
{
diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc
index 38fa634..4fc5de1 100644
--- a/paludis/generator_TEST.cc
+++ b/paludis/generator_TEST.cc
@@ -110,7 +110,8 @@ namespace test_cases
struct MatchesGeneratorTestCase : GeneratorTestCaseBase
{
MatchesGeneratorTestCase() :
- GeneratorTestCaseBase("matches", generator::Matches(parse_user_package_dep_spec("cat/a", UserPackageDepSpecOptions())))
+ GeneratorTestCaseBase("matches", generator::Matches(parse_user_package_dep_spec("cat/a",
+ &env, UserPackageDepSpecOptions())))
{
}
@@ -128,7 +129,7 @@ namespace test_cases
{
MatchesCatWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches cat wildcard", generator::Matches(parse_user_package_dep_spec("*/a",
- UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
{
}
@@ -146,7 +147,7 @@ namespace test_cases
{
MatchesPkgWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches pkg wildcard", generator::Matches(parse_user_package_dep_spec("cat/*",
- UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
{
}
@@ -166,7 +167,8 @@ namespace test_cases
{
MatchesAllWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches all wildcard", generator::Matches(
- parse_user_package_dep_spec(">=*/*-2", UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ parse_user_package_dep_spec(">=*/*-2",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
{
}
@@ -273,8 +275,10 @@ namespace test_cases
{
IntersectionGeneratorTestCase() :
GeneratorTestCaseBase("intersection", generator::Intersection(
- generator::Matches(parse_user_package_dep_spec("*/a", UserPackageDepSpecOptions() + updso_allow_wildcards)),
- generator::Matches(parse_user_package_dep_spec("cat/*", UserPackageDepSpecOptions() + updso_allow_wildcards))
+ generator::Matches(parse_user_package_dep_spec("*/a",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards)),
+ generator::Matches(parse_user_package_dep_spec("cat/*",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards))
))
{
}
diff --git a/paludis/range_rewriter_TEST.cc b/paludis/range_rewriter_TEST.cc
index e32c568..e6c0f16 100644
--- a/paludis/range_rewriter_TEST.cc
+++ b/paludis/range_rewriter_TEST.cc
@@ -22,6 +22,7 @@
#include <paludis/user_dep_spec.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/options.hh>
+#include <paludis/environments/test/test_environment.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
@@ -40,10 +41,13 @@ namespace test_cases
void run()
{
+ TestEnvironment env;
std::tr1::shared_ptr<TreeLeaf<DependencySpecTree, PackageDepSpec> > a(new TreeLeaf<DependencySpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("=a/b-1", UserPackageDepSpecOptions())))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("=a/b-1",
+ &env, UserPackageDepSpecOptions())))));
std::tr1::shared_ptr<TreeLeaf<DependencySpecTree, PackageDepSpec> > b(new TreeLeaf<DependencySpecTree, PackageDepSpec>(
- std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("=a/b-2", UserPackageDepSpecOptions())))));
+ std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(parse_user_package_dep_spec("=a/b-2",
+ &env, UserPackageDepSpecOptions())))));
RangeRewriter r;
TEST_CHECK(! r.spec());
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index b8a8da6..48338da 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -251,7 +251,8 @@ EInstalledRepository::package_set(const SetName & s) const
SetFile world(SetFileParams::create()
.file_name(_imp->params.deprecated_world)
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1,
+ _imp->params.environment, UserPackageDepSpecOptions(), filter::All()))
.tag(tag)
.set_operator_mode(sfsmo_natural)
.environment(_imp->params.environment));
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 8e91ce3..669d6e2 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -495,7 +495,7 @@ namespace test_cases
TestMessageSuffix pass_suffix(stringify(pass), true);
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description");
@@ -540,7 +540,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK(id1->short_description_key());
@@ -557,7 +557,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-2",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id2->end_metadata() != id2->find_metadata("EAPI"));
TEST_CHECK(id2->short_description_key());
@@ -608,7 +608,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/stale-pkg-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK(id1->short_description_key());
@@ -621,7 +621,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/stale-pkg-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK(id1->short_description_key());
@@ -668,7 +668,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-two-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK_EQUAL((*std::tr1::static_pointer_cast<const erepository::ERepositoryID>(id1)->eapi())[k::name()], "UNKNOWN");
@@ -704,13 +704,13 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> p1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> p2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-two/pkg-two-1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> p4(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-2",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(repo->query_use(UseFlagName("flag1"), *p1) == use_enabled);
TEST_CHECK(repo->query_use(UseFlagName("flag2"), *p1) == use_disabled);
@@ -762,29 +762,29 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-18",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-18",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-18",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-18",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-19",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-19",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-19",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-19",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
}
} test_e_repository_repository_masks;
@@ -815,13 +815,13 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/not_masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
}
}
} test_e_repository_query_profile_masks;
@@ -849,15 +849,15 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
repo->set_profile(repo->find_profile(repo->params().location / "profiles/profile/subprofile"));
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
repo->set_profile(repo->find_profile(repo->params().location / "profiles/profile"));
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions()))))]->begin())->masked());
}
} test_e_repository_invalidate_masks;
@@ -1015,7 +1015,7 @@ namespace test_cases
TestMessageSuffix suffix("no files", true);
const std::tr1::shared_ptr<const PackageID> no_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/no-files",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(no_files_id);
TEST_CHECK(no_files_id->short_description_key());
TEST_CHECK_EQUAL(no_files_id->short_description_key()->value(), "The Description");
@@ -1026,7 +1026,7 @@ namespace test_cases
TestMessageSuffix suffix("fetched files", true);
const std::tr1::shared_ptr<const PackageID> fetched_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(fetched_files_id);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "already-fetched.txt").is_regular_file());
fetched_files_id->perform_action(action);
@@ -1038,7 +1038,7 @@ namespace test_cases
TEST_CHECK(! (FSEntry("e_repository_TEST_dir") / "distdir" / "fetchable-1.txt").is_regular_file());
const std::tr1::shared_ptr<const PackageID> fetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(fetchable_files_id);
fetchable_files_id->perform_action(action);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "fetchable-1.txt").is_regular_file());
@@ -1049,7 +1049,7 @@ namespace test_cases
TEST_CHECK(! (FSEntry("e_repository_TEST_dir") / "distdir" / "arrowed.txt").is_regular_file());
const std::tr1::shared_ptr<const PackageID> arrow_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/arrow-files",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(arrow_files_id);
arrow_files_id->perform_action(action);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "arrowed.txt").is_regular_file());
@@ -1059,7 +1059,7 @@ namespace test_cases
TestMessageSuffix suffix("unfetchable files", true);
const std::tr1::shared_ptr<const PackageID> unfetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unfetchable-files",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(unfetchable_files_id);
TEST_CHECK_THROWS(unfetchable_files_id->perform_action(action), FetchActionError);
}
@@ -1067,7 +1067,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageID> no_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/no-files-restricted",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(no_files_restricted_id);
no_files_restricted_id->perform_action(action);
}
@@ -1075,7 +1075,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageID> fetched_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files-restricted",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(fetched_files_restricted_id);
fetched_files_restricted_id->perform_action(action);
}
@@ -1083,7 +1083,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageID> fetchable_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files-restricted",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(fetchable_files_restricted_id);
TEST_CHECK_THROWS(fetchable_files_restricted_id->perform_action(action), FetchActionError);
}
@@ -1115,7 +1115,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::AllVersionsSorted(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("category/package",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
repo->make_manifest(id->name());
id->perform_action(action);
@@ -1176,7 +1176,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=virtual/virtual-pretend-installed-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
}
@@ -1184,7 +1184,7 @@ namespace test_cases
TestMessageSuffix suffix("in-ebuild die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1193,7 +1193,7 @@ namespace test_cases
TestMessageSuffix suffix("in-subshell die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1202,7 +1202,7 @@ namespace test_cases
TestMessageSuffix suffix("success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1211,7 +1211,7 @@ namespace test_cases
TestMessageSuffix suffix("unpack die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1220,7 +1220,7 @@ namespace test_cases
TestMessageSuffix suffix("econf die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/econf-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1229,7 +1229,7 @@ namespace test_cases
TestMessageSuffix suffix("emake fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1238,7 +1238,7 @@ namespace test_cases
TestMessageSuffix suffix("emake die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1247,7 +1247,7 @@ namespace test_cases
TestMessageSuffix suffix("einstall die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/einstall-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1256,7 +1256,7 @@ namespace test_cases
TestMessageSuffix suffix("keepdir die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1265,7 +1265,7 @@ namespace test_cases
TestMessageSuffix suffix("dobin fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1274,7 +1274,7 @@ namespace test_cases
TestMessageSuffix suffix("dobin die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1283,7 +1283,7 @@ namespace test_cases
TestMessageSuffix suffix("fperms fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1292,7 +1292,7 @@ namespace test_cases
TestMessageSuffix suffix("fperms die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1301,7 +1301,7 @@ namespace test_cases
TestMessageSuffix suffix("econf source 0", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
@@ -1311,7 +1311,7 @@ namespace test_cases
TestMessageSuffix suffix("best version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1320,7 +1320,7 @@ namespace test_cases
TestMessageSuffix suffix("has version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1329,7 +1329,7 @@ namespace test_cases
TestMessageSuffix suffix("match", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/match-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1338,7 +1338,7 @@ namespace test_cases
TestMessageSuffix suffix("vars", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/vars-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1347,7 +1347,7 @@ namespace test_cases
TestMessageSuffix suffix("expand vars", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1400,7 +1400,7 @@ namespace test_cases
TestMessageSuffix suffix("econf source 1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1410,7 +1410,7 @@ namespace test_cases
TestMessageSuffix suffix("dosym success 1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1464,7 +1464,7 @@ namespace test_cases
TestMessageSuffix suffix("econf source kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1474,7 +1474,7 @@ namespace test_cases
TestMessageSuffix suffix("banned functions kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/banned-functions-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
@@ -1484,7 +1484,7 @@ namespace test_cases
TestMessageSuffix suffix("banned vars kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/banned-vars-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "UNKNOWN");
}
@@ -1493,7 +1493,7 @@ namespace test_cases
TestMessageSuffix suffix("dosym success kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1503,7 +1503,7 @@ namespace test_cases
TestMessageSuffix suffix("dosym fail kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-fail-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
@@ -1552,7 +1552,7 @@ namespace test_cases
TestMessageSuffix suffix("info success kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/info-success-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1562,7 +1562,7 @@ namespace test_cases
TestMessageSuffix suffix("info fail kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/info-fail-kdebuild-1",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
TEST_CHECK_THROWS(id->perform_action(action), InfoActionError);
@@ -1624,7 +1624,7 @@ namespace test_cases
TestMessageSuffix suffix("in-ebuild die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1633,7 +1633,7 @@ namespace test_cases
TestMessageSuffix suffix("in-subshell die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1642,7 +1642,7 @@ namespace test_cases
TestMessageSuffix suffix("success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1651,7 +1651,7 @@ namespace test_cases
TestMessageSuffix suffix("expatch success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1660,7 +1660,7 @@ namespace test_cases
TestMessageSuffix suffix("expatch die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1669,7 +1669,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal expatch fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1678,7 +1678,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal expatch die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1687,7 +1687,7 @@ namespace test_cases
TestMessageSuffix suffix("unpack die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1696,7 +1696,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal unpack fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1705,7 +1705,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal unpack die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1714,7 +1714,7 @@ namespace test_cases
TestMessageSuffix suffix("econf fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/econf-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1723,7 +1723,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal econf", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1732,7 +1732,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal econf die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1741,7 +1741,7 @@ namespace test_cases
TestMessageSuffix suffix("emake fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1750,7 +1750,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal emake", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1759,7 +1759,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal emake die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1768,7 +1768,7 @@ namespace test_cases
TestMessageSuffix suffix("einstall fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/einstall-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1777,7 +1777,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal einstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1786,7 +1786,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal einstall die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1795,7 +1795,7 @@ namespace test_cases
TestMessageSuffix suffix("keepdir success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1804,7 +1804,7 @@ namespace test_cases
TestMessageSuffix suffix("keepdir fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1813,7 +1813,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal keepdir", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1822,7 +1822,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal keepdir die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1831,7 +1831,7 @@ namespace test_cases
TestMessageSuffix suffix("dobin success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1840,7 +1840,7 @@ namespace test_cases
TestMessageSuffix suffix("dobin fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1849,7 +1849,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal dobin success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1858,7 +1858,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal dobin fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1867,7 +1867,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal dobin die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1876,7 +1876,7 @@ namespace test_cases
TestMessageSuffix suffix("fperms success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1885,7 +1885,7 @@ namespace test_cases
TestMessageSuffix suffix("fperms fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1894,7 +1894,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal fperms success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-success",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1903,7 +1903,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal fperms fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-fail",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1912,7 +1912,7 @@ namespace test_cases
TestMessageSuffix suffix("nonfatal fperms die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-die",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1921,7 +1921,7 @@ namespace test_cases
TestMessageSuffix suffix("best version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1930,7 +1930,7 @@ namespace test_cases
TestMessageSuffix suffix("has version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1939,7 +1939,7 @@ namespace test_cases
TestMessageSuffix suffix("match", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/match-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1948,7 +1948,7 @@ namespace test_cases
TestMessageSuffix suffix("ever", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/ever-1.3",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Description");
@@ -1959,7 +1959,7 @@ namespace test_cases
TestMessageSuffix suffix("econf phase", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-phase-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1968,7 +1968,7 @@ namespace test_cases
TestMessageSuffix suffix("econf vars", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-vars-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1977,7 +1977,7 @@ namespace test_cases
TestMessageSuffix suffix("expand vars", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2004,7 +2004,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("category/package",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
StringifyFormatter ff;
@@ -2078,7 +2078,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/pkg",
- UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
id->perform_action(action);
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 82ccaf2..a6e1bb4 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -118,7 +118,8 @@ ERepositorySets::package_set(const SetName & ss) const
.file_name(ff)
.environment(_imp->environment)
.type(sft_paludis_conf)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1,
+ _imp->environment, UserPackageDepSpecOptions(), filter::All()))
.set_operator_mode(s.second)
.tag(tag));
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 4cb7f5c..402e5dd 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -59,7 +59,8 @@ namespace test_cases
const std::tr1::shared_ptr<const EAPI> eapi(EAPIData::get_instance()->eapi_from_string("exheres-0"));
FetchVisitor v(&env, *env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("=cat/pkg-1", UserPackageDepSpecOptions())))]->begin(),
+ generator::Matches(parse_user_package_dep_spec("=cat/pkg-1",
+ &env, UserPackageDepSpecOptions())))]->begin(),
*eapi, FSEntry("fetch_visitor_TEST_dir/out"),
false, false, "test", make_shared_ptr(new URIListedThenMirrorsLabel("listed-then-mirrors")), false);
parse_fetchable_uri("file:///" + stringify(FSEntry("fetch_visitor_TEST_dir/in/input1").realpath()), &env, id, *eapi)->accept(v);
diff --git a/paludis/repositories/e/qa/visibility_TEST.cc b/paludis/repositories/e/qa/visibility_TEST.cc
index 74b8451..4e91c28 100644
--- a/paludis/repositories/e/qa/visibility_TEST.cc
+++ b/paludis/repositories/e/qa/visibility_TEST.cc
@@ -85,7 +85,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/visible-1", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/visible-1", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r1;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r1, &env, repo, id1, "visibility"));
TEST_CHECK_EQUAL(r1.count, 0u);
@@ -93,7 +93,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/visible-2", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/visible-2", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r2;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r2, &env, repo, id2, "visibility"));
TEST_CHECK_EQUAL(r2.count, 0u);
@@ -101,7 +101,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/masked-1", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/masked-1", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r3;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r3, &env, repo, id3, "visibility"));
TEST_CHECK_EQUAL(r3.count, 0u);
@@ -109,7 +109,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id4(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/needs-masked-1", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/needs-masked-1", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r4;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r4, &env, repo, id4, "visibility"));
TestMessageSuffix s4(r4.messages);
@@ -118,7 +118,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id5(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-1", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-1", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r5;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r5, &env, repo, id5, "visibility"));
TestMessageSuffix s5(r5.messages);
@@ -127,7 +127,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id6(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-2", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-2", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r6;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r6, &env, repo, id6, "visibility"));
TestMessageSuffix s6(r6.messages);
@@ -136,7 +136,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id7(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-3", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-3", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r7;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r7, &env, repo, id7, "visibility"));
TEST_CHECK_EQUAL(r7.count, 0u);
@@ -144,7 +144,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id8(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-4", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-4", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r8;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r8, &env, repo, id8, "visibility"));
TEST_CHECK_EQUAL(r8.count, 0u);
@@ -152,7 +152,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id9(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-5", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-5", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r9;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r9, &env, repo, id9, "visibility"));
TEST_CHECK_EQUAL(r9.count, 0u);
@@ -160,7 +160,7 @@ namespace test_cases
{
std::tr1::shared_ptr<const PackageID> id10(*env[selection::RequireExactlyOne(generator::Matches(parse_user_package_dep_spec(
- "=cat-one/use-masking-6", UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-6", &env, UserPackageDepSpecOptions())))]->begin());
TestReporter r10;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r10, &env, repo, id10, "visibility"));
TEST_CHECK_EQUAL(r10.count, 0u);
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index e4c006e..db585ea 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -915,7 +915,8 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
if (std::string::npos == s.rfind('-'))
continue;
- PackageDepSpec p(parse_user_package_dep_spec("=" + stringify(c) + "/" + s, UserPackageDepSpecOptions()));
+ PackageDepSpec p(parse_user_package_dep_spec("=" + stringify(c) + "/" + s,
+ _imp->params.environment, UserPackageDepSpecOptions()));
q->insert(*p.package_ptr());
IDMap::iterator i(_imp->ids.find(*p.package_ptr()));
if (_imp->ids.end() == i)
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 9f3f580..75c9aaa 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -129,7 +129,8 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
std::tr1::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK((*repo)[k::use_interface()]->query_use(UseFlagName("flag1"), *e1) == use_enabled);
TEST_CHECK((*repo)[k::use_interface()]->query_use(UseFlagName("flag2"), *e1) == use_enabled);
@@ -210,7 +211,8 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
std::tr1::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", UserPackageDepSpecOptions()))))]->begin());
+ PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
+ &env, UserPackageDepSpecOptions()))))]->begin());
ContentsGatherer gatherer;
std::for_each(indirect_iterator(e1->contents_key()->value()->begin()),
indirect_iterator(e1->contents_key()->value()->end()),
@@ -265,7 +267,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("category/package",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
StringifyFormatter ff;
@@ -353,7 +355,7 @@ namespace test_cases
TestMessageSuffix suffix("install", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -364,7 +366,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -375,7 +377,7 @@ namespace test_cases
TestMessageSuffix suffix("info", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(info_action);
}
@@ -384,7 +386,7 @@ namespace test_cases
TestMessageSuffix suffix("config", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(config_action);
}
@@ -393,7 +395,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(uninstall_action);
}
@@ -468,7 +470,7 @@ namespace test_cases
TestMessageSuffix suffix("vars", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -479,7 +481,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -490,7 +492,7 @@ namespace test_cases
TestMessageSuffix suffix("info", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(info_action);
}
@@ -499,7 +501,7 @@ namespace test_cases
TestMessageSuffix suffix("config", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(config_action);
}
@@ -508,7 +510,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
TEST_CHECK(id);
id->perform_action(uninstall_action);
}
@@ -586,7 +588,7 @@ namespace test_cases
TestMessageSuffix suffix("install", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -601,7 +603,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -616,10 +618,10 @@ namespace test_cases
TestMessageSuffix suffix("upgrade", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1.1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
inst_id->perform_action(uninstall_action);
@@ -636,10 +638,10 @@ namespace test_cases
TestMessageSuffix suffix("downgrade", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1.1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
inst_id->perform_action(uninstall_action);
@@ -656,7 +658,7 @@ namespace test_cases
TestMessageSuffix suffix("new slot", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -671,7 +673,7 @@ namespace test_cases
TestMessageSuffix suffix("remove other slot", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -686,7 +688,7 @@ namespace test_cases
TestMessageSuffix suffix("new package", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -703,7 +705,7 @@ namespace test_cases
TestMessageSuffix suffix("remove other package", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -718,7 +720,7 @@ namespace test_cases
TestMessageSuffix suffix("new category", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat2/pkg1-1::namesincrtest_src",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -733,7 +735,7 @@ namespace test_cases
TestMessageSuffix suffix("remove other category", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat2/pkg1-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -748,7 +750,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -940,7 +942,7 @@ namespace test_cases
TestMessageSuffix suffix("install", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -951,7 +953,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -962,10 +964,10 @@ namespace test_cases
TestMessageSuffix suffix("upgrade", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1.1::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
inst_id->perform_action(uninstall_action);
@@ -978,7 +980,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall equivalent", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1.1::providesincrtest_src2",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -989,10 +991,10 @@ namespace test_cases
TestMessageSuffix suffix("downgrade", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1.1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
inst_id->perform_action(uninstall_action);
@@ -1005,7 +1007,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall different PROVIDE", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::providesincrtest_src2",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1016,7 +1018,7 @@ namespace test_cases
TestMessageSuffix suffix("new slot", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1027,7 +1029,7 @@ namespace test_cases
TestMessageSuffix suffix("remove other slot", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1038,7 +1040,7 @@ namespace test_cases
TestMessageSuffix suffix("new package", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::providesincrtest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1049,7 +1051,7 @@ namespace test_cases
TestMessageSuffix suffix("remove other package", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1060,7 +1062,7 @@ namespace test_cases
TestMessageSuffix suffix("uninstall", true);
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1149,7 +1151,7 @@ namespace test_cases
TestMessageSuffix suffix("install", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1161,7 +1163,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src1",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1173,7 +1175,7 @@ namespace test_cases
TestMessageSuffix suffix("reinstall equivalent", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1::reinstalltest_src2",
- UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions()))))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
diff --git a/paludis/repositories/unpackaged/dep_parser.cc b/paludis/repositories/unpackaged/dep_parser.cc
index 6676ea1..3818eda 100644
--- a/paludis/repositories/unpackaged/dep_parser.cc
+++ b/paludis/repositories/unpackaged/dep_parser.cc
@@ -30,7 +30,7 @@ using namespace paludis;
using namespace paludis::unpackaged_repositories;
std::tr1::shared_ptr<const DependencySpecTree::ConstItem>
-DepParser::parse(const std::string & s)
+DepParser::parse(const Environment * const env, const std::string & s)
{
Context context("When parsing '" + s + "':");
@@ -51,7 +51,7 @@ DepParser::parse(const std::string & s)
std::tr1::shared_ptr<TreeLeaf<DependencySpecTree, PackageDepSpec> > spec(
new TreeLeaf<DependencySpecTree, PackageDepSpec>(std::tr1::shared_ptr<PackageDepSpec>(
- new PackageDepSpec(parse_user_package_dep_spec(a, UserPackageDepSpecOptions())))));
+ new PackageDepSpec(parse_user_package_dep_spec(a, env, UserPackageDepSpecOptions())))));
result->add(spec);
}
diff --git a/paludis/repositories/unpackaged/dep_parser.hh b/paludis/repositories/unpackaged/dep_parser.hh
index 060812f..c65a1f7 100644
--- a/paludis/repositories/unpackaged/dep_parser.hh
+++ b/paludis/repositories/unpackaged/dep_parser.hh
@@ -22,6 +22,7 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/dep_tree.hh>
+#include <paludis/environment-fwd.hh>
namespace paludis
{
@@ -31,7 +32,8 @@ namespace paludis
private InstantiationPolicy<DepParser, instantiation_method::NonInstantiableTag>
{
public:
- static std::tr1::shared_ptr<const DependencySpecTree::ConstItem> parse(const std::string &);
+ static std::tr1::shared_ptr<const DependencySpecTree::ConstItem> parse(
+ const Environment * const env, const std::string &);
};
}
}
diff --git a/paludis/repositories/unpackaged/dep_parser_TEST.cc b/paludis/repositories/unpackaged/dep_parser_TEST.cc
index b4792ba..bf7ccfe 100644
--- a/paludis/repositories/unpackaged/dep_parser_TEST.cc
+++ b/paludis/repositories/unpackaged/dep_parser_TEST.cc
@@ -38,7 +38,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- std::tr1::shared_ptr<const DependencySpecTree::ConstItem> spec(DepParser::parse("cat/one , cat/two, cat/three\n"));
+ std::tr1::shared_ptr<const DependencySpecTree::ConstItem> spec(
+ DepParser::parse(&env, "cat/one , cat/two, cat/three\n"));
StringifyFormatter f;
DepPrinter p(&env, f, true);
spec->accept(p);
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 04bcd06..39ceed6 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -201,7 +201,7 @@ namespace
if (! f)
throw FSError("Couldn't open '" + stringify(_f) + "' for read");
- _v = DepParser::parse(strip_trailing(
+ _v = DepParser::parse(_env, strip_trailing(
std::string((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>()), "\n"));
return _v;
}
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index b4171bc..58a4908 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -123,7 +123,8 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:0", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
+ &env, UserPackageDepSpecOptions())))]->begin());
TEST_CHECK_EQUAL(id1->version(), VersionSpec("1"));
TEST_CHECK_EQUAL(id1->slot(), SlotName("0"));
@@ -140,7 +141,8 @@ namespace test_cases
TEST_CHECK_EQUAL(d1.s.str(), "dir</fnord>");
const std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:1",
+ &env, UserPackageDepSpecOptions())))]->begin());
TEST_CHECK_EQUAL(id2->version(), VersionSpec("2"));
TEST_CHECK_EQUAL(id2->slot(), SlotName("1"));
@@ -175,12 +177,14 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:0", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
+ &env, UserPackageDepSpecOptions())))]->begin());
TEST_CHECK(! id1->masked());
const std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:1",
+ &env, UserPackageDepSpecOptions())))]->begin());
TEST_CHECK(! id2->masked());
}
@@ -210,7 +214,8 @@ namespace test_cases
TEST_CHECK(repo->some_ids_might_support_action(SupportsActionTest<InstalledAction>()));
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:1", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:1",
+ &env, UserPackageDepSpecOptions())))]->begin());
TEST_CHECK(! id1->supports_action(SupportsActionTest<InstallAction>()));
TEST_CHECK(! id1->supports_action(SupportsActionTest<ConfigAction>()));
@@ -298,7 +303,8 @@ namespace test_cases
TEST_CHECK(FSEntry("installed_repository_TEST_dir/repo3/indices/packages/foo/cat-one").is_symbolic_link());
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(
- generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred", UserPackageDepSpecOptions())))]->begin());
+ generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred",
+ &env, UserPackageDepSpecOptions())))]->begin());
UninstallAction action(UninstallActionOptions::named_create()
(k::no_config_protect(), false)
@@ -538,7 +544,8 @@ namespace test_cases
UninstallAction action(UninstallActionOptions::named_create()
(k::no_config_protect(), false));
(*env[selection::RequireExactlyOne(generator::Matches(
- parse_user_package_dep_spec("cat/pkg4a", UserPackageDepSpecOptions())))]->begin())->perform_action(action);
+ parse_user_package_dep_spec("cat/pkg4a",
+ &env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -578,7 +585,8 @@ namespace test_cases
UninstallAction action(UninstallActionOptions::named_create()
(k::no_config_protect(), false));
(*env[selection::RequireExactlyOne(generator::Matches(
- parse_user_package_dep_spec("cat/pkg4b", UserPackageDepSpecOptions())))]->begin())->perform_action(action);
+ parse_user_package_dep_spec("cat/pkg4b",
+ &env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index 01df30e..8a8117e 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -39,7 +39,7 @@ namespace paludis
Implementation(const Environment * const e, const std::string & v,
const std::tr1::shared_ptr<const DependencyLabelSequence> & l) :
env(e),
- value(DepParser::parse(v)),
+ value(DepParser::parse(env, v)),
labels(l)
{
}
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index 44bdff6..3750bd4 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -62,7 +62,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"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(">=cat/pkg-2", UserPackageDepSpecOptions()))));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
TEST_CHECK(repo->virtual_packages());
TEST_CHECK_EQUAL(std::distance(repo->virtual_packages()->begin(), repo->virtual_packages()->end()), 1);
@@ -96,14 +96,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"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", UserPackageDepSpecOptions()))));
+ new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
repo1->add_virtual_package(QualifiedPackageName("virtual/foo"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", UserPackageDepSpecOptions()))));
+ new PackageDepSpec(parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(">=cat/pkg-2", UserPackageDepSpecOptions()))));
+ parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions()))));
repo2->add_virtual_package(QualifiedPackageName("virtual/foo"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec("<=cat/pkg-1", UserPackageDepSpecOptions()))));
+ parse_user_package_dep_spec("<=cat/pkg-1", &env, UserPackageDepSpecOptions()))));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
@@ -134,11 +134,11 @@ namespace test_cases
repo1->add_version("virtual", "gkp", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(
- new PackageDepSpec(parse_user_package_dep_spec("virtual/gkp", UserPackageDepSpecOptions()))));
+ new PackageDepSpec(parse_user_package_dep_spec("virtual/gkp", &env, UserPackageDepSpecOptions()))));
repo2->add_version("virtual", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec("virtual/pkg", UserPackageDepSpecOptions()))));
+ parse_user_package_dep_spec("virtual/pkg", &env, UserPackageDepSpecOptions()))));
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
diff --git a/paludis/selection_TEST.cc b/paludis/selection_TEST.cc
index 98490ca..6c3fb50 100644
--- a/paludis/selection_TEST.cc
+++ b/paludis/selection_TEST.cc
@@ -46,59 +46,59 @@ namespace test_cases
void run()
{
- TestEnvironment e;
+ TestEnvironment env;
- std::tr1::shared_ptr<FakeRepository> r1(new FakeRepository(&e, RepositoryName("repo1")));
+ std::tr1::shared_ptr<FakeRepository> r1(new FakeRepository(&env, RepositoryName("repo1")));
r1->add_version("r1c1", "r1c1p1", "1");
r1->add_version("r1c1", "r1c1p2", "1");
r1->add_version("r1c1", "r1c1p2", "2");
r1->add_version("rac1", "rac1pa", "1");
r1->add_version("rac1", "rac1pa", "2");
- e.package_database()->add_repository(11, r1);
+ env.package_database()->add_repository(11, r1);
TEST_CHECK(true);
- std::tr1::shared_ptr<FakeRepository> r2(new FakeRepository(&e, RepositoryName("repo2")));
+ std::tr1::shared_ptr<FakeRepository> r2(new FakeRepository(&env, RepositoryName("repo2")));
r2->add_version("rac1", "rac1pa", "1");
r2->add_version("rac1", "rac1pa", "3");
- e.package_database()->add_repository(10, r2);
+ env.package_database()->add_repository(10, r2);
TEST_CHECK(true);
- PackageDepSpec d1(parse_user_package_dep_spec("r1c1/r1c1p1", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q1(e[selection::AllVersionsSorted(generator::Matches(d1))]);
+ PackageDepSpec d1(parse_user_package_dep_spec("r1c1/r1c1p1", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d1))]);
TEST_CHECK_EQUAL(std::distance(q1->begin(), q1->end()), 1);
- PackageDepSpec d2(parse_user_package_dep_spec("r1c1/r1c1p2", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q2(e[selection::AllVersionsSorted(generator::Matches(d2))]);
+ PackageDepSpec d2(parse_user_package_dep_spec("r1c1/r1c1p2", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsSorted(generator::Matches(d2))]);
TEST_CHECK_EQUAL(std::distance(q2->begin(), q2->end()), 2);
- PackageDepSpec d3(parse_user_package_dep_spec(">=r1c1/r1c1p2-1", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q3(e[selection::AllVersionsSorted(generator::Matches(d3))]);
+ PackageDepSpec d3(parse_user_package_dep_spec(">=r1c1/r1c1p2-1", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q3(env[selection::AllVersionsSorted(generator::Matches(d3))]);
TEST_CHECK_EQUAL(std::distance(q3->begin(), q3->end()), 2);
- PackageDepSpec d4(parse_user_package_dep_spec(">=r1c1/r1c1p2-2", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q4(e[selection::AllVersionsSorted(generator::Matches(d4))]);
+ PackageDepSpec d4(parse_user_package_dep_spec(">=r1c1/r1c1p2-2", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q4(env[selection::AllVersionsSorted(generator::Matches(d4))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q4->begin()), indirect_iterator(q4->end()), " "),
"r1c1/r1c1p2-2:0::repo1");
TEST_CHECK_EQUAL(std::distance(q4->begin(), q4->end()), 1);
- PackageDepSpec d5(parse_user_package_dep_spec(">=r1c1/r1c1p2-3", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q5(e[selection::AllVersionsSorted(generator::Matches(d5))]);
+ PackageDepSpec d5(parse_user_package_dep_spec(">=r1c1/r1c1p2-3", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(d5))]);
TEST_CHECK_EQUAL(std::distance(q5->begin(), q5->end()), 0);
- PackageDepSpec d6(parse_user_package_dep_spec("<r1c1/r1c1p2-3", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q6(e[selection::AllVersionsSorted(generator::Matches(d6))]);
+ PackageDepSpec d6(parse_user_package_dep_spec("<r1c1/r1c1p2-3", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsSorted(generator::Matches(d6))]);
TEST_CHECK_EQUAL(std::distance(q6->begin(), q6->end()), 2);
- PackageDepSpec d7(parse_user_package_dep_spec("rac1/rac1pa", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q7(e[selection::AllVersionsSorted(generator::Matches(d7))]);
+ PackageDepSpec d7(parse_user_package_dep_spec("rac1/rac1pa", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q7(env[selection::AllVersionsSorted(generator::Matches(d7))]);
TEST_CHECK_EQUAL(std::distance(q7->begin(), q7->end()), 4);
- PackageDepSpec d8(parse_user_package_dep_spec("foo/bar", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q8(e[selection::AllVersionsSorted(generator::Matches(d8))]);
+ PackageDepSpec d8(parse_user_package_dep_spec("foo/bar", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q8(env[selection::AllVersionsSorted(generator::Matches(d8))]);
TEST_CHECK_EQUAL(std::distance(q8->begin(), q8->end()), 0);
- PackageDepSpec d9(parse_user_package_dep_spec("r1c1/r1c1p1", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q9(e[selection::AllVersionsSorted(generator::Matches(d9)
+ PackageDepSpec d9(parse_user_package_dep_spec("r1c1/r1c1p1", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsSorted(generator::Matches(d9)
| filter::SupportsAction<InstallAction>())]);
TEST_CHECK_EQUAL(std::distance(q9->begin(), q9->end()), 1);
}
@@ -110,72 +110,72 @@ namespace test_cases
void run()
{
- TestEnvironment e;
+ TestEnvironment env;
- std::tr1::shared_ptr<FakeRepository> r1(new FakeRepository(&e, RepositoryName("repo1")));
+ std::tr1::shared_ptr<FakeRepository> r1(new FakeRepository(&env, RepositoryName("repo1")));
r1->add_version("cat", "pkg", "1")->set_slot(SlotName("a"));
r1->add_version("cat", "pkg", "2")->set_slot(SlotName("c"));
r1->add_version("cat", "pkg", "3")->set_slot(SlotName("c"));
r1->add_version("cat", "pkg", "4")->set_slot(SlotName("a"));
- e.package_database()->add_repository(10, r1);
+ env.package_database()->add_repository(10, r1);
TEST_CHECK(true);
- std::tr1::shared_ptr<FakeRepository> r2(new FakeRepository(&e, RepositoryName("repo2")));
+ std::tr1::shared_ptr<FakeRepository> r2(new FakeRepository(&env, RepositoryName("repo2")));
r2->add_version("cat", "pkg", "1")->set_slot(SlotName("a"));
r2->add_version("cat", "pkg", "3")->set_slot(SlotName("b"));
- e.package_database()->add_repository(5, r2);
+ env.package_database()->add_repository(5, r2);
TEST_CHECK(true);
- PackageDepSpec d(parse_user_package_dep_spec("cat/pkg", UserPackageDepSpecOptions()));
+ PackageDepSpec d(parse_user_package_dep_spec("cat/pkg", &env, UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q1(e[selection::AllVersionsSorted(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q1->begin()), indirect_iterator(q1->end()), " "),
"cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-2:c::repo1 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q2(e[selection::AllVersionsGroupedBySlot(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsGroupedBySlot(generator::Matches(d))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q2->begin()), indirect_iterator(q2->end()), " "),
"cat/pkg-3:b::repo2 cat/pkg-2:c::repo1 cat/pkg-3:c::repo1 cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q3(e[selection::BestVersionOnly(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q3(env[selection::BestVersionOnly(generator::Matches(d))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q3->begin()), indirect_iterator(q3->end()), " "),
"cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q4(e[selection::BestVersionInEachSlot(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q4(env[selection::BestVersionInEachSlot(generator::Matches(d))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q4->begin()), indirect_iterator(q4->end()), " "),
"cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1");
- std::tr1::shared_ptr<FakeRepository> r3(new FakeRepository(&e, RepositoryName("repo3")));
+ std::tr1::shared_ptr<FakeRepository> r3(new FakeRepository(&env, RepositoryName("repo3")));
r3->add_version("cat", "other", "1")->set_slot(SlotName("a"));
- e.package_database()->add_repository(5, r3);
+ env.package_database()->add_repository(5, r3);
TEST_CHECK(true);
- PackageDepSpec c(parse_user_package_dep_spec("cat/*", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec c(parse_user_package_dep_spec("cat/*", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
- const std::tr1::shared_ptr<const PackageIDSequence> q5(e[selection::AllVersionsSorted(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(c))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q5->begin()), indirect_iterator(q5->end()), " "),
"cat/other-1:a::repo3 cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-2:c::repo1 "
"cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q6(e[selection::AllVersionsGroupedBySlot(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsGroupedBySlot(generator::Matches(c))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q6->begin()), indirect_iterator(q6->end()), " "),
"cat/other-1:a::repo3 cat/pkg-3:b::repo2 cat/pkg-2:c::repo1 cat/pkg-3:c::repo1 "
"cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q7(e[selection::BestVersionOnly(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q7(env[selection::BestVersionOnly(generator::Matches(c))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q7->begin()), indirect_iterator(q7->end()), " "),
"cat/other-1:a::repo3 cat/pkg-4:a::repo1");
- const std::tr1::shared_ptr<const PackageIDSequence> q8(e[selection::BestVersionInEachSlot(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q8(env[selection::BestVersionInEachSlot(generator::Matches(c))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q8->begin()), indirect_iterator(q8->end()), " "),
"cat/other-1:a::repo3 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1 cat/pkg-4:a::repo1");
- PackageDepSpec b(parse_user_package_dep_spec("cat/pkg:a", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q9(e[selection::AllVersionsGroupedBySlot(generator::Matches(b))]);
+ PackageDepSpec b(parse_user_package_dep_spec("cat/pkg:a", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsGroupedBySlot(generator::Matches(b))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q9->begin()), indirect_iterator(q9->end()), " "),
"cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-4:a::repo1");
- PackageDepSpec a(parse_user_package_dep_spec("cat/pkg[=1|=3]", UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q10(e[selection::AllVersionsGroupedBySlot(generator::Matches(a))]);
+ PackageDepSpec a(parse_user_package_dep_spec("cat/pkg[=1|=3]", &env, UserPackageDepSpecOptions()));
+ const std::tr1::shared_ptr<const PackageIDSequence> q10(env[selection::AllVersionsGroupedBySlot(generator::Matches(a))]);
TEST_CHECK_EQUAL(join(indirect_iterator(q10->begin()), indirect_iterator(q10->end()), " "),
"cat/pkg-1:a::repo2 cat/pkg-1:a::repo1 cat/pkg-3:b::repo2 cat/pkg-3:c::repo1");
}
diff --git a/paludis/set_file_TEST.cc b/paludis/set_file_TEST.cc
index 8541020..781c337 100644
--- a/paludis/set_file_TEST.cc
+++ b/paludis/set_file_TEST.cc
@@ -24,6 +24,7 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/dep_spec.hh>
#include <paludis/user_dep_spec.hh>
+#include <paludis/environments/test/test_environment.hh>
#include <fstream>
using namespace test;
@@ -70,10 +71,13 @@ namespace test_cases
{
using namespace std::tr1::placeholders;
+ TestEnvironment env;
+
SetFile f(SetFileParams::create()
.file_name(FSEntry("set_file_TEST_dir/simple1"))
.type(sft_simple)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(0));
@@ -134,10 +138,13 @@ namespace test_cases
{
using namespace std::tr1::placeholders;
+ TestEnvironment env;
+
SetFile f(SetFileParams::create()
.file_name(FSEntry("set_file_TEST_dir/paludisconf1"))
.type(sft_paludis_conf)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(0));
@@ -201,10 +208,13 @@ namespace test_cases
{
using namespace std::tr1::placeholders;
+ TestEnvironment env;
+
SetFile f(SetFileParams::create()
.file_name(FSEntry("set_file_TEST_dir/override"))
.type(sft_paludis_conf)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_natural)
.environment(0));
@@ -218,7 +228,8 @@ namespace test_cases
SetFile fstar(SetFileParams::create()
.file_name(FSEntry("set_file_TEST_dir/override"))
.type(sft_paludis_conf)
- .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, UserPackageDepSpecOptions()))
+ .parser(std::tr1::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(),
+ filter::All()))
.tag(std::tr1::shared_ptr<DepTag>())
.set_operator_mode(sfsmo_star)
.environment(0));
diff --git a/paludis/stringify_formatter_TEST.cc b/paludis/stringify_formatter_TEST.cc
index 1b7a5e5..5450f16 100644
--- a/paludis/stringify_formatter_TEST.cc
+++ b/paludis/stringify_formatter_TEST.cc
@@ -24,6 +24,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_tree.hh>
#include <paludis/user_dep_spec.hh>
+#include <paludis/environments/test/test_environment.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
#include <paludis/util/clone-impl.hh>
@@ -109,12 +110,15 @@ namespace test_cases
void run()
{
+ TestEnvironment env;
+
PartialFormatter f;
StringifyFormatter ff(f);
- BlockDepSpec b(make_shared_ptr(new PackageDepSpec(parse_user_package_dep_spec("cat/pkg", UserPackageDepSpecOptions()))));
+ BlockDepSpec b(make_shared_ptr(new PackageDepSpec(parse_user_package_dep_spec("cat/pkg", &env,
+ UserPackageDepSpecOptions()))));
NamedSetDepSpec u(SetName("foo"));
std::string s(format_three(
- parse_user_package_dep_spec("cat/pkg", UserPackageDepSpecOptions()),
+ parse_user_package_dep_spec("cat/pkg", &env, UserPackageDepSpecOptions()),
b, u,
ff));
TEST_CHECK_EQUAL(s, "<cat/pkg> !cat/pkg foo");
diff --git a/paludis/uninstall_list_TEST.cc b/paludis/uninstall_list_TEST.cc
index aab5798..c8cf335 100644
--- a/paludis/uninstall_list_TEST.cc
+++ b/paludis/uninstall_list_TEST.cc
@@ -346,7 +346,7 @@ namespace test_cases
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("foo/moo", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("foo/moo", &env, UserPackageDepSpecOptions()))))));
installed_repo->add_package_set(SetName("world"), world);
}
@@ -387,10 +387,10 @@ namespace test_cases
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("foo/moo", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("foo/moo", &env, UserPackageDepSpecOptions()))))));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("foo/bar", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("foo/bar", &env, UserPackageDepSpecOptions()))))));
installed_repo->add_package_set(SetName("world"), world);
}
@@ -431,16 +431,16 @@ namespace test_cases
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("cat/needs-a", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("cat/needs-a", &env, UserPackageDepSpecOptions()))))));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("cat/needs-b", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("cat/needs-b", &env, UserPackageDepSpecOptions()))))));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("cat/needs-c", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("cat/needs-c", &env, UserPackageDepSpecOptions()))))));
world->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
- parse_user_package_dep_spec("cat/needs-d", UserPackageDepSpecOptions()))))));
+ parse_user_package_dep_spec("cat/needs-d", &env, UserPackageDepSpecOptions()))))));
installed_repo->add_package_set(SetName("world"), world);
}
diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc
index af45312..8bce1a8 100644
--- a/paludis/user_dep_spec_TEST.cc
+++ b/paludis/user_dep_spec_TEST.cc
@@ -28,6 +28,7 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/version_requirements.hh>
+#include <paludis/environments/test/test_environment.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -42,13 +43,15 @@ namespace test_cases
void run()
{
- PackageDepSpec a(parse_user_package_dep_spec("foo/bar", UserPackageDepSpecOptions()));
+ TestEnvironment env;
+
+ PackageDepSpec a(parse_user_package_dep_spec("foo/bar", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(a, "foo/bar");
TEST_CHECK_STRINGIFY_EQUAL(*a.package_ptr(), "foo/bar");
TEST_CHECK(! a.slot_requirement_ptr());
TEST_CHECK(! a.version_requirements_ptr());
- PackageDepSpec b(parse_user_package_dep_spec(">=foo/bar-1.2.3", UserPackageDepSpecOptions()));
+ PackageDepSpec b(parse_user_package_dep_spec(">=foo/bar-1.2.3", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(b, ">=foo/bar-1.2.3");
TEST_CHECK_STRINGIFY_EQUAL(*b.package_ptr(), "foo/bar");
TEST_CHECK(! b.slot_requirement_ptr());
@@ -58,14 +61,14 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(b.version_requirements_ptr()->begin()->version_spec, "1.2.3");
TEST_CHECK_EQUAL(b.version_requirements_ptr()->begin()->version_operator, vo_greater_equal);
- PackageDepSpec c(parse_user_package_dep_spec("foo/bar:baz", UserPackageDepSpecOptions()));
+ PackageDepSpec c(parse_user_package_dep_spec("foo/bar:baz", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(c, "foo/bar:baz");
TEST_CHECK_STRINGIFY_EQUAL(*c.package_ptr(), "foo/bar");
TEST_CHECK(c.slot_requirement_ptr());
TEST_CHECK_STRINGIFY_EQUAL(*c.slot_requirement_ptr(), ":baz");
TEST_CHECK(! c.version_requirements_ptr());
- PackageDepSpec d(parse_user_package_dep_spec("=foo/bar-1.2*:1.2.1", UserPackageDepSpecOptions()));
+ PackageDepSpec d(parse_user_package_dep_spec("=foo/bar-1.2*:1.2.1", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(d, "=foo/bar-1.2*:1.2.1");
TEST_CHECK_STRINGIFY_EQUAL(*d.package_ptr(), "foo/bar");
TEST_CHECK(d.slot_requirement_ptr());
@@ -74,35 +77,35 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(d.version_requirements_ptr()->begin()->version_spec, "1.2");
TEST_CHECK_EQUAL(d.version_requirements_ptr()->begin()->version_operator, vo_equal_star);
- PackageDepSpec e(parse_user_package_dep_spec("foo/bar:1.2.1", UserPackageDepSpecOptions()));
+ PackageDepSpec e(parse_user_package_dep_spec("foo/bar:1.2.1", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(e, "foo/bar:1.2.1");
TEST_CHECK_STRINGIFY_EQUAL(*e.package_ptr(), "foo/bar");
TEST_CHECK(e.slot_requirement_ptr());
TEST_CHECK_STRINGIFY_EQUAL(*e.slot_requirement_ptr(), ":1.2.1");
TEST_CHECK(! e.version_requirements_ptr());
- PackageDepSpec f(parse_user_package_dep_spec("foo/bar:0", UserPackageDepSpecOptions()));
+ PackageDepSpec f(parse_user_package_dep_spec("foo/bar:0", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(f, "foo/bar:0");
TEST_CHECK_STRINGIFY_EQUAL(*f.package_ptr(), "foo/bar");
TEST_CHECK(f.slot_requirement_ptr());
TEST_CHECK_STRINGIFY_EQUAL(*f.slot_requirement_ptr(), ":0");
TEST_CHECK(! f.version_requirements_ptr());
- PackageDepSpec g(parse_user_package_dep_spec("foo/bar-100dpi", UserPackageDepSpecOptions()));
+ PackageDepSpec g(parse_user_package_dep_spec("foo/bar-100dpi", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(g, "foo/bar-100dpi");
TEST_CHECK_STRINGIFY_EQUAL(*g.package_ptr(), "foo/bar-100dpi");
- PackageDepSpec h(parse_user_package_dep_spec(">=foo/bar-100dpi-1.23", UserPackageDepSpecOptions()));
+ PackageDepSpec h(parse_user_package_dep_spec(">=foo/bar-100dpi-1.23", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(h, ">=foo/bar-100dpi-1.23");
TEST_CHECK_STRINGIFY_EQUAL(*h.package_ptr(), "foo/bar-100dpi");
TEST_CHECK(h.version_requirements_ptr());
TEST_CHECK_STRINGIFY_EQUAL(h.version_requirements_ptr()->begin()->version_spec, "1.23");
TEST_CHECK_EQUAL(h.version_requirements_ptr()->begin()->version_operator, vo_greater_equal);
- TEST_CHECK_THROWS(parse_user_package_dep_spec("", UserPackageDepSpecOptions()), PackageDepSpecError);
- TEST_CHECK_THROWS(parse_user_package_dep_spec("=foo/bar-1.2[=1.3]", UserPackageDepSpecOptions()), PackageDepSpecError);
+ TEST_CHECK_THROWS(parse_user_package_dep_spec("", &env, UserPackageDepSpecOptions()), PackageDepSpecError);
+ TEST_CHECK_THROWS(parse_user_package_dep_spec("=foo/bar-1.2[=1.3]", &env, UserPackageDepSpecOptions()), PackageDepSpecError);
- PackageDepSpec i(parse_user_package_dep_spec("foo/bar[one][-two]", UserPackageDepSpecOptions()));
+ PackageDepSpec i(parse_user_package_dep_spec("foo/bar[one][-two]", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(i, "foo/bar[-two][one]");
TEST_CHECK_STRINGIFY_EQUAL(*i.package_ptr(), "foo/bar");
TEST_CHECK(! i.version_requirements_ptr());
@@ -110,21 +113,21 @@ namespace test_cases
TEST_CHECK(! i.slot_requirement_ptr());
TEST_CHECK(i.additional_requirements_ptr());
- PackageDepSpec j(parse_user_package_dep_spec("=foo/bar-scm-r3", UserPackageDepSpecOptions()));
+ PackageDepSpec j(parse_user_package_dep_spec("=foo/bar-scm-r3", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(j, "=foo/bar-scm-r3");
TEST_CHECK_STRINGIFY_EQUAL(*j.package_ptr(), "foo/bar");
TEST_CHECK(j.version_requirements_ptr());
TEST_CHECK_STRINGIFY_EQUAL(j.version_requirements_ptr()->begin()->version_spec, "scm-r3");
TEST_CHECK_EQUAL(j.version_requirements_ptr()->begin()->version_operator, vo_equal);
- PackageDepSpec k(parse_user_package_dep_spec("=foo/bar-scm", UserPackageDepSpecOptions()));
+ PackageDepSpec k(parse_user_package_dep_spec("=foo/bar-scm", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(k, "=foo/bar-scm");
TEST_CHECK_STRINGIFY_EQUAL(*k.package_ptr(), "foo/bar");
TEST_CHECK(k.version_requirements_ptr());
TEST_CHECK_STRINGIFY_EQUAL(k.version_requirements_ptr()->begin()->version_spec, "scm");
TEST_CHECK_EQUAL(k.version_requirements_ptr()->begin()->version_operator, vo_equal);
- PackageDepSpec l(parse_user_package_dep_spec("foo/bar[one][-two][>=1.2&<2.0]", UserPackageDepSpecOptions()));
+ PackageDepSpec l(parse_user_package_dep_spec("foo/bar[one][-two][>=1.2&<2.0]", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(l, "foo/bar[>=1.2&<2.0][-two][one]");
TEST_CHECK_STRINGIFY_EQUAL(*l.package_ptr(), "foo/bar");
TEST_CHECK(l.version_requirements_ptr());
@@ -135,7 +138,7 @@ namespace test_cases
TEST_CHECK_EQUAL(next(l.version_requirements_ptr()->begin())->version_operator, vo_less);
TEST_CHECK(! l.slot_requirement_ptr());
- PackageDepSpec m(parse_user_package_dep_spec("foo/bar[=1.2|=1.3*|~1.4]", UserPackageDepSpecOptions()));
+ PackageDepSpec m(parse_user_package_dep_spec("foo/bar[=1.2|=1.3*|~1.4]", &env, UserPackageDepSpecOptions()));
TEST_CHECK_STRINGIFY_EQUAL(m, "foo/bar[=1.2|=1.3*|~1.4]");
TEST_CHECK_STRINGIFY_EQUAL(*m.package_ptr(), "foo/bar");
TEST_CHECK(m.version_requirements_ptr());
@@ -156,40 +159,42 @@ namespace test_cases
void run()
{
- PackageDepSpec a(parse_user_package_dep_spec("*/*", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ TestEnvironment env;
+
+ PackageDepSpec a(parse_user_package_dep_spec("*/*", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(a, "*/*");
TEST_CHECK(! a.package_ptr());
TEST_CHECK(! a.package_name_part_ptr());
TEST_CHECK(! a.category_name_part_ptr());
- PackageDepSpec b(parse_user_package_dep_spec("foo/*", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec b(parse_user_package_dep_spec("foo/*", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(b, "foo/*");
TEST_CHECK(! b.package_ptr());
TEST_CHECK(! b.package_name_part_ptr());
TEST_CHECK(b.category_name_part_ptr());
TEST_CHECK_EQUAL(*b.category_name_part_ptr(), CategoryNamePart("foo"));
- PackageDepSpec c(parse_user_package_dep_spec("*/foo", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec c(parse_user_package_dep_spec("*/foo", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(c, "*/foo");
TEST_CHECK(! c.package_ptr());
TEST_CHECK(c.package_name_part_ptr());
TEST_CHECK_EQUAL(*c.package_name_part_ptr(), PackageNamePart("foo"));
TEST_CHECK(! c.category_name_part_ptr());
- PackageDepSpec d(parse_user_package_dep_spec("~*/*-0", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec d(parse_user_package_dep_spec("~*/*-0", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(d, "~*/*-0");
TEST_CHECK(! d.package_ptr());
TEST_CHECK(! d.package_name_part_ptr());
TEST_CHECK(! d.category_name_part_ptr());
- PackageDepSpec e(parse_user_package_dep_spec(">=foo/*-1.23", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec e(parse_user_package_dep_spec(">=foo/*-1.23", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(e, ">=foo/*-1.23");
TEST_CHECK(! e.package_ptr());
TEST_CHECK(! e.package_name_part_ptr());
TEST_CHECK(e.category_name_part_ptr());
TEST_CHECK_EQUAL(*e.category_name_part_ptr(), CategoryNamePart("foo"));
- PackageDepSpec f(parse_user_package_dep_spec("=*/foo-1*", UserPackageDepSpecOptions() + updso_allow_wildcards));
+ PackageDepSpec f(parse_user_package_dep_spec("=*/foo-1*", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
TEST_CHECK_STRINGIFY_EQUAL(f, "=*/foo-1*");
TEST_CHECK(! f.package_ptr());
TEST_CHECK(f.package_name_part_ptr());