aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-13 00:01:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-13 15:42:28 +0000
commit635179144839fa31015fe85cd9226a655d217f03 (patch)
tree3756d05592232534a80d52fcc8e50ee7dc319768
parent8ae61a8b1335efdaef0208a138b178ba221b4b18 (diff)
downloadpaludis-635179144839fa31015fe85cd9226a655d217f03.tar.gz
paludis-635179144839fa31015fe85cd9226a655d217f03.tar.xz
Add MatchPackageOptions.
Fixes: ticket:655
-rw-r--r--doc/api/cplusplus/examples/example_action.cc2
-rw-r--r--doc/api/cplusplus/examples/example_contents.cc2
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec.cc2
-rw-r--r--doc/api/cplusplus/examples/example_formatter.cc2
-rw-r--r--doc/api/cplusplus/examples/example_mask.cc2
-rw-r--r--doc/api/cplusplus/examples/example_match_package.cc6
-rw-r--r--doc/api/cplusplus/examples/example_metadata_key.cc2
-rw-r--r--doc/api/cplusplus/examples/example_package_id.cc2
-rw-r--r--doc/api/cplusplus/examples/example_selection.cc8
-rw-r--r--doc/api/cplusplus/examples/example_stringify_formatter.cc2
-rw-r--r--doc/api/ruby/example_action.rb2
-rw-r--r--doc/api/ruby/example_contents.rb2
-rw-r--r--doc/api/ruby/example_environment.rb2
-rw-r--r--doc/api/ruby/example_mask.rb2
-rw-r--r--doc/api/ruby/example_match_package.rb6
-rw-r--r--doc/api/ruby/example_package_id.rb2
-rw-r--r--doc/api/ruby/example_selection.rb8
-rw-r--r--paludis/dep_list.cc41
-rw-r--r--paludis/dep_list.hh1
-rw-r--r--paludis/dep_list.sr2
-rw-r--r--paludis/environments/paludis/keywords_conf.cc6
-rw-r--r--paludis/environments/paludis/licenses_conf.cc6
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc4
-rw-r--r--paludis/environments/paludis/paludis_environment_TEST.cc14
-rw-r--r--paludis/environments/paludis/use_conf.cc12
-rw-r--r--paludis/environments/portage/portage_environment.cc10
-rw-r--r--paludis/environments/portage/portage_environment_TEST.cc16
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/filter_TEST.cc2
-rw-r--r--paludis/generator.cc17
-rw-r--r--paludis/generator.hh4
-rw-r--r--paludis/generator_TEST.cc12
-rw-r--r--paludis/install_task.cc17
-rw-r--r--paludis/match_package-fwd.hh41
-rw-r--r--paludis/match_package.cc26
-rw-r--r--paludis/match_package.hh7
-rw-r--r--paludis/match_package.se20
-rw-r--r--paludis/package_database.cc2
-rw-r--r--paludis/query_visitor.cc3
-rw-r--r--paludis/report_task.cc15
-rw-r--r--paludis/repositories/cran/dep_spec_pretty_printer.cc5
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer.cc5
-rw-r--r--paludis/repositories/e/e_repository.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc266
-rw-r--r--paludis/repositories/e/e_repository_news.cc2
-rw-r--r--paludis/repositories/e/e_repository_profile.cc8
-rw-r--r--paludis/repositories/e/e_repository_sets.cc3
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc80
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc20
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc2
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc2
-rw-r--r--paludis/repositories/e/info_metadata_key.cc2
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc6
-rw-r--r--paludis/repositories/e/qa/visibility.cc3
-rw-r--r--paludis/repositories/e/qa/visibility_TEST.cc20
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc112
-rw-r--r--paludis/repositories/unpackaged/dep_printer.cc5
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc16
-rw-r--r--paludis/repositories/virtuals/package_id.cc4
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc2
-rw-r--r--paludis/selection_TEST.cc38
-rw-r--r--paludis/set_file.cc3
-rw-r--r--paludis/show_suggest_visitor.cc6
-rw-r--r--paludis/uninstall_list.cc8
-rw-r--r--paludis/uninstall_task.cc6
-rw-r--r--python/Makefile.am1
-rw-r--r--python/generator.cc2
-rw-r--r--python/generator_TEST.py6
-rwxr-xr-xpython/mask_TEST.py12
-rw-r--r--python/match_package.cc43
-rw-r--r--python/paludis_python.hh1
-rw-r--r--python/paludis_python_so.cc1
-rw-r--r--ruby/dep_list.cc57
-rw-r--r--ruby/dep_list_TEST.rb12
-rw-r--r--ruby/environment_TEST.rb18
-rw-r--r--ruby/generator.cc9
-rw-r--r--ruby/generator_TEST.rb7
-rw-r--r--ruby/paludis_ruby.cc46
-rw-r--r--ruby/paludis_ruby.hh2
-rw-r--r--ruby/paludis_ruby_TEST.rb16
-rw-r--r--ruby/repository_TEST.rb4
-rw-r--r--src/clients/adjutrix/downgrade_check.cc3
-rw-r--r--src/clients/adjutrix/find_insecure_packages.cc3
-rw-r--r--src/clients/adjutrix/find_reverse_deps.cc6
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc1
-rw-r--r--src/clients/cave/cmd_print_id_contents.cc2
-rw-r--r--src/clients/cave/cmd_print_id_metadata.cc2
-rw-r--r--src/clients/cave/cmd_print_ids.cc2
-rw-r--r--src/clients/cave/cmd_show.cc8
-rw-r--r--src/clients/cave/select_format_for_spec.cc4
-rw-r--r--src/clients/paludis/applets.cc10
-rw-r--r--src/clients/paludis/do_config.cc2
-rw-r--r--src/clients/paludis/do_contents.cc2
-rw-r--r--src/clients/paludis/do_executables.cc2
-rw-r--r--src/clients/paludis/info.cc6
-rw-r--r--src/output/console_install_task.cc15
-rw-r--r--src/output/console_query_task.cc6
98 files changed, 759 insertions, 514 deletions
diff --git a/doc/api/cplusplus/examples/example_action.cc b/doc/api/cplusplus/examples/example_action.cc
index 2f12f2d..4bfeb0c 100644
--- a/doc/api/cplusplus/examples/example_action.cc
+++ b/doc/api/cplusplus/examples/example_action.cc
@@ -38,7 +38,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))))]);
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_contents.cc b/doc/api/cplusplus/examples/example_contents.cc
index 4287943..31069d6 100644
--- a/doc/api/cplusplus/examples/example_contents.cc
+++ b/doc/api/cplusplus/examples/example_contents.cc
@@ -80,7 +80,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installed 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>())]);
/* For each ID: */
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc
index 1b180dc..aaeb712 100644
--- a/doc/api/cplusplus/examples/example_dep_spec.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec.cc
@@ -143,7 +143,7 @@ int main(int argc, char * argv[])
/* And display packages matching that spec */
cout << " " << left << setw(24) << "Matches:" << " ";
- std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(generator::Matches(spec))]);
+ std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(generator::Matches(spec, MatchPackageOptions()))]);
bool need_indent(false);
for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
i != i_end ; ++i)
diff --git a/doc/api/cplusplus/examples/example_formatter.cc b/doc/api/cplusplus/examples/example_formatter.cc
index fdb5a0a..1025717 100644
--- a/doc/api/cplusplus/examples/example_formatter.cc
+++ b/doc/api/cplusplus/examples/example_formatter.cc
@@ -170,7 +170,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installable 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>())]);
/* Write nice valid XHTML, because we're good like that. */
diff --git a/doc/api/cplusplus/examples/example_mask.cc b/doc/api/cplusplus/examples/example_mask.cc
index 87625e3..aefbee8 100644
--- a/doc/api/cplusplus/examples/example_mask.cc
+++ b/doc/api/cplusplus/examples/example_mask.cc
@@ -85,7 +85,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))))]);
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc
index e82f4e4..10e3102 100644
--- a/doc/api/cplusplus/examples/example_match_package.cc
+++ b/doc/api/cplusplus/examples/example_match_package.cc
@@ -53,13 +53,13 @@ int main(int argc, char * argv[])
i != i_end ; ++i)
{
/* Is it paludis? */
- if (match_package(*env, make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), **i))
+ if (match_package(*env, make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), **i, MatchPackageOptions()))
cout << left << setw(50) << (stringify(**i) + ":") << " " << "paludis" << endl;
/* No. Is it in system or world? */
- else if (match_package_in_set(*env, *system, **i))
+ else if (match_package_in_set(*env, *system, **i, MatchPackageOptions()))
cout << left << setw(50) << (stringify(**i) + ":") << " " << "system" << endl;
- else if (match_package_in_set(*env, *world, **i))
+ else if (match_package_in_set(*env, *world, **i, MatchPackageOptions()))
cout << left << setw(50) << (stringify(**i) + ":") << " " << "world" << endl;
else
cout << left << setw(50) << (stringify(**i) + ":") << " " << "nothing" << endl;
diff --git a/doc/api/cplusplus/examples/example_metadata_key.cc b/doc/api/cplusplus/examples/example_metadata_key.cc
index 8bf1b11..381a426 100644
--- a/doc/api/cplusplus/examples/example_metadata_key.cc
+++ b/doc/api/cplusplus/examples/example_metadata_key.cc
@@ -262,7 +262,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))))]);
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_package_id.cc b/doc/api/cplusplus/examples/example_package_id.cc
index 78016c4..d9b813e 100644
--- a/doc/api/cplusplus/examples/example_package_id.cc
+++ b/doc/api/cplusplus/examples/example_package_id.cc
@@ -47,7 +47,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))))]);
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_selection.cc b/doc/api/cplusplus/examples/example_selection.cc
index b048f8e..38a2a55 100644
--- a/doc/api/cplusplus/examples/example_selection.cc
+++ b/doc/api/cplusplus/examples/example_selection.cc
@@ -62,19 +62,19 @@ int main(int argc, char * argv[])
* object used determines the number and ordering of results. In the
* simplest form, it takes a Generator as a parameter. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")))));
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions())));
/* Generators can be passed through a Filter. The Selection optimises
* the code internally to avoid doing excess work. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>()));
/* Filters can be combined. Usually filter::NotMasked should be combined
* with filter::SupportsAction<InstallAction>, since installed packages
* aren't masked. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
@@ -82,7 +82,7 @@ int main(int argc, char * argv[])
* is no metadata cache. Consider using other Selection objects if
* you only need the best matching or some arbitrary matching ID. */
show_selection(env, selection::BestVersionOnly(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
}
diff --git a/doc/api/cplusplus/examples/example_stringify_formatter.cc b/doc/api/cplusplus/examples/example_stringify_formatter.cc
index dcd5176..232d753 100644
--- a/doc/api/cplusplus/examples/example_stringify_formatter.cc
+++ b/doc/api/cplusplus/examples/example_stringify_formatter.cc
@@ -39,7 +39,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installable 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
+ generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>())]);
/* For each ID: */
diff --git a/doc/api/ruby/example_action.rb b/doc/api/ruby/example_action.rb
index 7922344..8cd500f 100644
--- a/doc/api/ruby/example_action.rb
+++ b/doc/api/ruby/example_action.rb
@@ -18,7 +18,7 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# Fetch package IDs for 'sys-apps/paludis'
ids = env[Selection::AllVersionsSorted.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, [])))]
+ Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, []), []))]
# For each ID:
ids.each do | id |
diff --git a/doc/api/ruby/example_contents.rb b/doc/api/ruby/example_contents.rb
index 2b48be9..c748c5c 100644
--- a/doc/api/ruby/example_contents.rb
+++ b/doc/api/ruby/example_contents.rb
@@ -18,7 +18,7 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# Fetch package IDs for installed 'sys-apps/paludis'
ids = env[Selection::AllVersionsSorted.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, [])) |
+ Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, []), []) |
Filter::SupportsAction.new(InstalledAction))]
# For each ID:
diff --git a/doc/api/ruby/example_environment.rb b/doc/api/ruby/example_environment.rb
index 00c98ee..ec313c3 100644
--- a/doc/api/ruby/example_environment.rb
+++ b/doc/api/ruby/example_environment.rb
@@ -41,7 +41,7 @@ end
# And use flags, for which we need package IDs:
ids = env[Selection::AllVersionsSorted.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec('sys-apps/paludis', env, [])) |
+ Generator::Matches.new(Paludis::parse_user_package_dep_spec('sys-apps/paludis', env, []), []) |
Filter::SupportsAction.new(InstalledAction))]
if (ids.length > 0)
diff --git a/doc/api/ruby/example_mask.rb b/doc/api/ruby/example_mask.rb
index 0f2f2c1..2bb306d 100644
--- a/doc/api/ruby/example_mask.rb
+++ b/doc/api/ruby/example_mask.rb
@@ -18,7 +18,7 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# Fetch package IDs for 'sys-apps/paludis'
ids = env[Selection::AllVersionsSorted.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, [])))]
+ Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, []), []))]
# For each ID:
ids.each do | id |
diff --git a/doc/api/ruby/example_match_package.rb b/doc/api/ruby/example_match_package.rb
index e0ac15d..293eb7b 100644
--- a/doc/api/ruby/example_match_package.rb
+++ b/doc/api/ruby/example_match_package.rb
@@ -28,11 +28,11 @@ world = env.set('world')
# For each ID:
ids.each do | id |
# Is it paludis?
- if match_package(env, parse_user_package_dep_spec('sys-apps/paludis', env, []), id)
+ if match_package(env, parse_user_package_dep_spec('sys-apps/paludis', env, []), id, [])
puts id.to_s.ljust(49) + ': paludis'
- elsif match_package_in_set(env, system, id)
+ elsif match_package_in_set(env, system, id, [])
puts id.to_s.ljust(49) + ': system'
- elsif match_package_in_set(env, world, id)
+ elsif match_package_in_set(env, world, id, [])
puts id.to_s.ljust(49) + ': world'
else
puts id.to_s.ljust(49) + ': nothing'
diff --git a/doc/api/ruby/example_package_id.rb b/doc/api/ruby/example_package_id.rb
index 8420911..1f8eb8a 100644
--- a/doc/api/ruby/example_package_id.rb
+++ b/doc/api/ruby/example_package_id.rb
@@ -20,7 +20,7 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# Fetch package IDs for installed 'sys-apps/paludis'
ids = env[Selection::AllVersionsSorted.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, [])))]
+ Generator::Matches.new(Paludis::parse_user_package_dep_spec("sys-apps/paludis", env, []), []))]
# For each ID:
ids.each do | id |
diff --git a/doc/api/ruby/example_selection.rb b/doc/api/ruby/example_selection.rb
index a718fc8..67ea707 100644
--- a/doc/api/ruby/example_selection.rb
+++ b/doc/api/ruby/example_selection.rb
@@ -34,19 +34,19 @@ env = EnvironmentFactory.instance.create(ExampleCommandLine.instance.environment
# object used determines the number and ordering of results. In the
# simplest form, it takes a Generator as a parameter.
show_selection(env, Selection::AllVersionsSorted.new(
- Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, []))))
+ Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, []), [])))
# Generators can be passed through a Filter. The Selection optimises
# the code internally to avoid doing excess work.
show_selection(env, Selection::AllVersionsSorted.new(
- Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, [])) |
+ Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, []), []) |
Filter::SupportsAction.new(InstalledAction)))
# Filters can be combined. Usually Filter::NotMasked should be combined
# with Filter::SupportsAction.new(InstallAction), since installed packages
# aren't masked.
show_selection(env, Selection::AllVersionsSorted.new(
- Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, [])) |
+ Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, []), []) |
Filter::SupportsAction.new(InstallAction) |
Filter::NotMasked.new))
@@ -54,7 +54,7 @@ show_selection(env, Selection::AllVersionsSorted.new(
# is no metadata cache. Consider using other Selection objects if
# you only need the best matching or some arbitrary matching ID.
show_selection(env, Selection::BestVersionOnly.new(
- Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, [])) |
+ Generator::Matches.new(parse_user_package_dep_spec("sys-apps/paludis", env, []), []) |
Filter::SupportsAction.new(InstallAction) |
Filter::NotMasked.new))
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index ba7119f..744c757 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -94,7 +94,8 @@ DepListOptions::DepListOptions() :
circular(dl_circular_error),
use(dl_use_deps_standard),
blocks(dl_blocks_accumulate),
- dependency_tags(false)
+ dependency_tags(false),
+ match_package_options()
{
/* when changing the above, also see src/paludis/command_line.cc. */
}
@@ -244,11 +245,13 @@ namespace
{
const Environment * const env;
const PackageDepSpec & a;
+ const MatchPackageOptions & o;
MatchDepListEntryAgainstPackageDepSpec(const Environment * const ee,
- const PackageDepSpec & aa) :
+ const PackageDepSpec & aa, const MatchPackageOptions & oo) :
env(ee),
- a(aa)
+ a(aa),
+ o(oo)
{
}
@@ -261,7 +264,7 @@ namespace
case dlk_provided:
case dlk_already_installed:
case dlk_subpackage:
- return match_package(*env, a, *e.second->package_id);
+ return match_package(*env, a, *e.second->package_id, o);
case dlk_block:
case dlk_masked:
@@ -388,7 +391,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
/* find already installed things */
// TODO: check destinations
std::tr1::shared_ptr<const PackageIDSequence> already_installed((*d->_imp->env)[selection::AllVersionsSorted(
- generator::Matches(a) | filter::SupportsAction<InstalledAction>())]);
+ generator::Matches(a, d->_imp->opts->match_package_options) | filter::SupportsAction<InstalledAction>())]);
/* are we already on the merge list? */
std::pair<MergeListIndex::iterator, MergeListIndex::iterator> q;
@@ -398,7 +401,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
q = std::make_pair(d->_imp->merge_list_index.begin(), d->_imp->merge_list_index.end());
MergeListIndex::iterator qq(std::find_if(q.first, q.second,
- MatchDepListEntryAgainstPackageDepSpec(d->_imp->env, a)));
+ MatchDepListEntryAgainstPackageDepSpec(d->_imp->env, a, d->_imp->opts->match_package_options)));
MergeList::iterator existing_merge_list_entry(qq == q.second ? d->_imp->merge_list.end() : qq->second);
if (existing_merge_list_entry != d->_imp->merge_list.end())
@@ -444,7 +447,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
/* find installable candidates, and find the best visible candidate */
std::tr1::shared_ptr<const PackageID> best_visible_candidate;
std::tr1::shared_ptr<const PackageIDSequence> installable_candidates(
- (*d->_imp->env)[selection::AllVersionsSorted(generator::Matches(a) &
+ (*d->_imp->env)[selection::AllVersionsSorted(generator::Matches(a, d->_imp->opts->match_package_options) &
generator::SomeIDsMightSupportAction<InstallAction>())]);
for (PackageIDSequence::ReverseConstIterator p(installable_candidates->rbegin()),
@@ -544,7 +547,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
throw AllMaskedError(a);
std::tr1::shared_ptr<const PackageIDSequence> match_except_reqs((*d->_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(*a.without_additional_requirements()))]);
+ generator::Matches(*a.without_additional_requirements(), d->_imp->opts->match_package_options))]);
for (PackageIDSequence::ConstIterator i(match_except_reqs->begin()),
i_end(match_except_reqs->end()) ; i != i_end ; ++i)
@@ -621,8 +624,8 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
(*d->_imp->env)[selection::AllVersionsSorted(
generator::Matches(make_package_dep_spec()
.package(best_visible_candidate->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(best_visible_candidate->slot())))
- ) |
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(best_visible_candidate->slot()))),
+ d->_imp->opts->match_package_options) |
filter::SupportsAction<InstalledAction>())]);
if (are_we_downgrading->empty())
@@ -829,10 +832,10 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
{
PackageDepSpec just_package(make_package_dep_spec().package(*a.blocked_spec()->package_ptr()));
already_installed = (*d->_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(just_package) |
+ generator::Matches(just_package, d->_imp->opts->match_package_options) |
filter::SupportsAction<InstalledAction>())];
- MatchDepListEntryAgainstPackageDepSpec m(d->_imp->env, just_package);
+ MatchDepListEntryAgainstPackageDepSpec m(d->_imp->env, just_package, d->_imp->opts->match_package_options);
for (std::pair<MergeListIndex::const_iterator, MergeListIndex::const_iterator> p(
d->_imp->merge_list_index.equal_range(*a.blocked_spec()->package_ptr())) ;
p.first != p.second ; ++p.first)
@@ -864,7 +867,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (PackageIDSequence::ConstIterator aa(already_installed->begin()),
aa_end(already_installed->end()) ; aa != aa_end ; ++aa)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), **aa))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), **aa, d->_imp->opts->match_package_options))
continue;
bool replaced(false);
@@ -927,7 +930,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (std::list<MergeList::const_iterator>::const_iterator r(will_be_installed.begin()),
r_end(will_be_installed.end()) ; r != r_end ; ++r)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), *(*r)->package_id))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), *(*r)->package_id, d->_imp->opts->match_package_options))
continue;
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
@@ -957,7 +960,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (MergeList::const_iterator r(d->_imp->merge_list.begin()),
r_end(d->_imp->merge_list.end()) ; r != r_end ; ++r)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), *r->package_id))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), *r->package_id, d->_imp->opts->match_package_options))
continue;
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
@@ -1128,7 +1131,7 @@ DepList::add_package(const std::tr1::shared_ptr<const PackageID> & p, const std:
z = std::make_pair(_imp->merge_list_index.begin(), _imp->merge_list_index.end());
MergeListIndex::iterator zz(std::find_if(z.first, z.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, *pp)));
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, *pp, _imp->opts->match_package_options)));
if (zz != z.second)
continue;
@@ -1573,7 +1576,7 @@ DepList::is_top_level_target(const PackageID & e) const
if (! _imp->current_top_level_target)
throw InternalError(PALUDIS_HERE, "current_top_level_target not set?");
- return match_package_in_set(*_imp->env, *_imp->current_top_level_target, e);
+ return match_package_in_set(*_imp->env, *_imp->current_top_level_target, e, _imp->opts->match_package_options);
}
namespace
@@ -1632,7 +1635,7 @@ DepList::replaced(const PackageID & m) const
PackageDepSpec spec(make_package_dep_spec().package(m.name()));
while (p.second != ((p.first = std::find_if(p.first, p.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, spec)))))
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, spec, _imp->opts->match_package_options)))))
{
if (p.first->second->package_id->slot() != m.slot())
p.first = next(p.first);
@@ -1653,7 +1656,7 @@ DepList::match_on_list(const PackageDepSpec & a) const
p = std::make_pair(_imp->merge_list_index.begin(), _imp->merge_list_index.end());
return p.second != std::find_if(p.first, p.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, a));
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, a, _imp->opts->match_package_options));
}
DepList::Iterator
diff --git a/paludis/dep_list.hh b/paludis/dep_list.hh
index 9add976..2f6a6b5 100644
--- a/paludis/dep_list.hh
+++ b/paludis/dep_list.hh
@@ -28,6 +28,7 @@
#include <paludis/handled_information-fwd.hh>
#include <paludis/name.hh>
#include <paludis/environment.hh>
+#include <paludis/match_package.hh>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/options.hh>
diff --git a/paludis/dep_list.sr b/paludis/dep_list.sr
index 814e6b4..61f8ad4 100644
--- a/paludis/dep_list.sr
+++ b/paludis/dep_list.sr
@@ -30,6 +30,8 @@ make_class_DepListOptions()
key dependency_tags bool
+ key match_package_options MatchPackageOptions
+
extra_constructors <<END
DepListOptions();
END
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index c9ffb35..155360a 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -155,7 +155,7 @@ KeywordsConf::query(const std::tr1::shared_ptr<const KeywordNameSet> & k, const
for (PDSToKeywordsList::const_iterator j(i->second.begin()), j_end(i->second.end()) ;
j != j_end ; ++j)
{
- if (! match_package(*_imp->env, *j->first, e))
+ if (! match_package(*_imp->env, *j->first, e, MatchPackageOptions()))
continue;
for (KeywordsList::const_iterator l(j->second.begin()), l_end(j->second.end()) ;
@@ -196,7 +196,7 @@ KeywordsConf::query(const std::tr1::shared_ptr<const KeywordNameSet> & k, const
}
}
- if (! match_package_in_set(*_imp->env, *i->second.first, e))
+ if (! match_package_in_set(*_imp->env, *i->second.first, e, MatchPackageOptions()))
continue;
for (KeywordsList::const_iterator l(i->second.second.begin()), l_end(i->second.second.end()) ;
@@ -222,7 +222,7 @@ KeywordsConf::query(const std::tr1::shared_ptr<const KeywordNameSet> & k, const
for (PDSToKeywordsList::const_iterator j(_imp->unqualified.begin()), j_end(_imp->unqualified.end()) ;
j != j_end ; ++j)
{
- if (! match_package(*_imp->env, *j->first, e))
+ if (! match_package(*_imp->env, *j->first, e, MatchPackageOptions()))
continue;
for (KeywordsList::const_iterator l(j->second.begin()), l_end(j->second.end()) ;
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 70fb479..1cf40b2 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -148,7 +148,7 @@ LicensesConf::query(const std::string & t, const PackageID & e) const
for (PDSToLicensesList::const_iterator j(i->second.begin()), j_end(i->second.end()) ;
j != j_end ; ++j)
{
- if (! match_package(*_imp->env, *j->first, e))
+ if (! match_package(*_imp->env, *j->first, e, MatchPackageOptions()))
continue;
for (LicensesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ;
@@ -188,7 +188,7 @@ LicensesConf::query(const std::string & t, const PackageID & e) const
}
}
- if (! match_package_in_set(*_imp->env, *i->second.first, e))
+ if (! match_package_in_set(*_imp->env, *i->second.first, e, MatchPackageOptions()))
continue;
for (LicensesList::const_iterator l(i->second.second.begin()), l_end(i->second.second.end()) ;
@@ -214,7 +214,7 @@ LicensesConf::query(const std::string & t, const PackageID & e) const
for (PDSToLicensesList::const_iterator j(_imp->unqualified.begin()), j_end(_imp->unqualified.end()) ;
j != j_end ; ++j)
{
- if (! match_package(*_imp->env, *j->first, e))
+ if (! match_package(*_imp->env, *j->first, e, MatchPackageOptions()))
continue;
for (LicensesList::const_iterator l(j->second.begin()), l_end(j->second.end()) ;
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index bdd029c..dbbe0f6 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -102,7 +102,7 @@ PackageMaskConf::query(const PackageID & e) const
if (indirect_iterator(_imp->masks.end()) != std::find_if(
indirect_iterator(_imp->masks.begin()),
indirect_iterator(_imp->masks.end()),
- std::tr1::bind(&match_package, std::tr1::ref(*_imp->env), _1, std::tr1::cref(e))))
+ std::tr1::bind(&match_package, std::tr1::ref(*_imp->env), _1, std::tr1::cref(e), MatchPackageOptions())))
return true;
{
@@ -123,7 +123,7 @@ PackageMaskConf::query(const PackageID & e) const
}
}
- if (match_package_in_set(*_imp->env, *it->second, e))
+ if (match_package_in_set(*_imp->env, *it->second, e, MatchPackageOptions()))
return true;
}
}
diff --git a/paludis/environments/paludis/paludis_environment_TEST.cc b/paludis/environments/paludis/paludis_environment_TEST.cc
index 057972e..0bdc0e4 100644
--- a/paludis/environments/paludis/paludis_environment_TEST.cc
+++ b/paludis/environments/paludis/paludis_environment_TEST.cc
@@ -64,10 +64,10 @@ 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",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(get_use("foo", one));
TEST_CHECK(! get_use("foofoo", one));
@@ -98,7 +98,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",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
std::tr1::shared_ptr<const Choice> foo_cards;
for (Choices::ConstIterator c(id1->choices_key()->value()->begin()), c_end(id1->choices_key()->value()->end()) ;
c != c_end ; ++c)
@@ -124,10 +124,10 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(get_use("foo", one));
TEST_CHECK(! get_use("foofoo", one));
@@ -157,10 +157,10 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> one(*(*env)[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- env.get(), UserPackageDepSpecOptions()))))]->begin());
+ env.get(), UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(get_use("foo", one));
TEST_CHECK(! get_use("foofoo", one));
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 5a3dbb6..75e1eac 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -219,7 +219,7 @@ UseConf::want_choice_enabled(
{
for (PDSWithUseInfoList::const_iterator p(q->second.begin()), p_end(q->second.end()) ; p != p_end ; ++p)
{
- if (! match_package(*_imp->env, *p->first, *id))
+ if (! match_package(*_imp->env, *p->first, *id, MatchPackageOptions()))
continue;
FlagNamePairWithStateMap::const_iterator i(p->second.first.find(std::make_pair(choice->prefix(), f)));
@@ -261,7 +261,7 @@ UseConf::want_choice_enabled(
}
}
- if (! match_package_in_set(*_imp->env, *r->second.first, *id))
+ if (! match_package_in_set(*_imp->env, *r->second.first, *id, MatchPackageOptions()))
continue;
FlagNamePairWithStateMap::const_iterator i(r->second.second.first.find(std::make_pair(choice->prefix(), f)));
@@ -290,7 +290,7 @@ UseConf::want_choice_enabled(
for (Unqualified::const_iterator p(_imp->unqualified.begin()), p_end(_imp->unqualified.end()) ; p != p_end ; ++p)
{
- if (! match_package(*_imp->env, *p->first, *id))
+ if (! match_package(*_imp->env, *p->first, *id, MatchPackageOptions()))
continue;
FlagNamePairWithStateMap::const_iterator i(p->second.first.find(std::make_pair(choice->prefix(), f)));
@@ -329,7 +329,7 @@ UseConf::known_choice_value_names(
if (_imp->qualified.end() != q)
for (PDSWithUseInfoList::const_iterator p(q->second.begin()), p_end(q->second.end()) ; p != p_end ; ++p)
{
- if (! match_package(*_imp->env, *p->first, *id))
+ if (! match_package(*_imp->env, *p->first, *id, MatchPackageOptions()))
continue;
for (FlagNamePairWithStateMap::const_iterator i(p->second.first.begin()), i_end(p->second.first.end()) ;
@@ -354,7 +354,7 @@ UseConf::known_choice_value_names(
}
}
- if (! match_package_in_set(*_imp->env, *r->second.first, *id))
+ if (! match_package_in_set(*_imp->env, *r->second.first, *id, MatchPackageOptions()))
continue;
for (FlagNamePairWithStateMap::const_iterator i(r->second.second.first.begin()), i_end(r->second.second.first.end()) ;
@@ -366,7 +366,7 @@ UseConf::known_choice_value_names(
for (Unqualified::const_iterator p(_imp->unqualified.begin()), p_end(_imp->unqualified.end()) ; p != p_end ; ++p)
{
- if (! match_package(*_imp->env, *p->first, *id))
+ if (! match_package(*_imp->env, *p->first, *id, MatchPackageOptions()))
continue;
for (FlagNamePairWithStateMap::const_iterator i(p->second.first.begin()), i_end(p->second.first.end()) ;
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 15a3266..cf00be0 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -572,7 +572,7 @@ PortageEnvironment::want_choice_enabled(
for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ;
i != i_end ; ++i)
{
- if (! match_package(*this, *i->first, *id))
+ if (! match_package(*this, *i->first, *id, MatchPackageOptions()))
continue;
if (i->second == stringify(f))
@@ -616,7 +616,7 @@ PortageEnvironment::accept_keywords(const std::tr1::shared_ptr <const KeywordNam
for (PackageKeywords::const_iterator i(_imp->package_keywords.begin()), i_end(_imp->package_keywords.end()) ;
i != i_end ; ++i)
{
- if (! match_package(*this, *i->first, d))
+ if (! match_package(*this, *i->first, d, MatchPackageOptions()))
continue;
if (i->second == stringify(*k))
@@ -649,7 +649,7 @@ PortageEnvironment::unmasked_by_user(const PackageID & e) const
{
for (PackageUnmask::const_iterator i(_imp->package_unmask.begin()), i_end(_imp->package_unmask.end()) ;
i != i_end ; ++i)
- if (match_package(*this, **i, e))
+ if (match_package(*this, **i, e, MatchPackageOptions()))
return true;
return false;
@@ -672,7 +672,7 @@ PortageEnvironment::known_choice_value_names(const std::tr1::shared_ptr<const Pa
for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ;
i != i_end ; ++i)
{
- if (! match_package(*this, *i->first, *id))
+ if (! match_package(*this, *i->first, *id, MatchPackageOptions()))
continue;
if (0 == i->second.compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
@@ -827,7 +827,7 @@ PortageEnvironment::mask_for_user(const PackageID & d) const
{
for (PackageMask::const_iterator i(_imp->package_mask.begin()), i_end(_imp->package_mask.end()) ;
i != i_end ; ++i)
- if (match_package(*this, **i, d))
+ if (match_package(*this, **i, d, MatchPackageOptions()))
return make_shared_ptr(new UserConfigMask);
return std::tr1::shared_ptr<const Mask>();
diff --git a/paludis/environments/portage/portage_environment_TEST.cc b/paludis/environments/portage/portage_environment_TEST.cc
index d8e89d3..a6626f2 100644
--- a/paludis/environments/portage/portage_environment_TEST.cc
+++ b/paludis/environments/portage/portage_environment_TEST.cc
@@ -83,11 +83,11 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(get_use("one", env, idx));
TEST_CHECK(get_use("two", env, idx));
@@ -115,7 +115,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
std::tr1::shared_ptr<const Choice> foo_cards;
for (Choices::ConstIterator c(id1->choices_key()->value()->begin()), c_end(id1->choices_key()->value()->end()) ;
c != c_end ; ++c)
@@ -138,7 +138,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> idx(*env[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-x-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *idx));
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *idx));
@@ -146,7 +146,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *id1));
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *id1));
@@ -154,7 +154,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-two-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("other_arch"), *id2));
TEST_CHECK(accept_keyword(env, KeywordName("arch"), *id2));
@@ -162,7 +162,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-three-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(! accept_keyword(env, KeywordName("other_arch"), *id3));
TEST_CHECK(! accept_keyword(env, KeywordName("arch"), *id3));
@@ -170,7 +170,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id4(*env[selection::RequireExactlyOne(
generator::Matches(PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-four-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(accept_keyword(env, KeywordName("fred"), *id4));
}
} test_accept_keywords;
diff --git a/paludis/files.m4 b/paludis/files.m4
index 2bc5385..74d674b 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -46,7 +46,7 @@ add(`hooker', `hh', `cc', `test', `testscript')
add(`install_task', `hh', `cc', `se')
add(`literal_metadata_key', `hh', `cc')
add(`mask', `hh', `cc', `fwd')
-add(`match_package', `hh', `cc')
+add(`match_package', `hh', `cc', `se', `fwd')
add(`merger', `hh', `cc', `fwd', `se', `test', `testscript')
add(`merger_entry_type', `hh', `cc', `se')
add(`metadata_key', `hh', `cc', `se', `fwd')
diff --git a/paludis/filter_TEST.cc b/paludis/filter_TEST.cc
index f95929d..8244f01 100644
--- a/paludis/filter_TEST.cc
+++ b/paludis/filter_TEST.cc
@@ -83,7 +83,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageIDSequence> got_none(env[selection::AllVersionsSorted(
generator::Matches(parse_user_package_dep_spec("not/exist", &env,
- UserPackageDepSpecOptions())) | filter)]);
+ UserPackageDepSpecOptions()), MatchPackageOptions()) | filter)]);
TEST_CHECK(got_none);
TEST_CHECK_EQUAL(join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "), "");
}
diff --git a/paludis/generator.cc b/paludis/generator.cc
index e168ab5..5fd53f7 100644
--- a/paludis/generator.cc
+++ b/paludis/generator.cc
@@ -278,9 +278,11 @@ namespace
AllGeneratorHandlerBase
{
const PackageDepSpec spec;
+ const MatchPackageOptions options;
- MatchesGeneratorHandler(const PackageDepSpec & s) :
- spec(s)
+ MatchesGeneratorHandler(const PackageDepSpec & s, const MatchPackageOptions & o) :
+ spec(s),
+ options(o)
{
}
@@ -431,7 +433,7 @@ namespace
env->package_database()->fetch_repository(*r)->package_ids(*q));
for (PackageIDSequence::ConstIterator i(id->begin()), i_end(id->end()) ;
i != i_end ; ++i)
- if (match_package(*env, spec, **i))
+ if (match_package(*env, spec, **i, options))
result->insert(*i);
}
}
@@ -441,7 +443,10 @@ namespace
virtual std::string as_string() const
{
- return "packages matching " + stringify(spec);
+ std::string suffix;
+ if (options[mpo_ignore_additional_requirements])
+ suffix = " (ignoring additional requirements)";
+ return "packages matching " + stringify(spec) + suffix;
}
};
@@ -603,8 +608,8 @@ generator::Package::Package(const QualifiedPackageName & n) :
{
}
-generator::Matches::Matches(const PackageDepSpec & spec) :
- Generator(make_shared_ptr(new MatchesGeneratorHandler(spec)))
+generator::Matches::Matches(const PackageDepSpec & spec, const MatchPackageOptions & o) :
+ Generator(make_shared_ptr(new MatchesGeneratorHandler(spec, o)))
{
}
diff --git a/paludis/generator.hh b/paludis/generator.hh
index 4f93f02..e8ceb68 100644
--- a/paludis/generator.hh
+++ b/paludis/generator.hh
@@ -23,11 +23,13 @@
#include <paludis/generator-fwd.hh>
#include <paludis/generator_handler-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/options.hh>
#include <paludis/filtered_generator-fwd.hh>
#include <paludis/name-fwd.hh>
#include <paludis/environment-fwd.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/dep_spec-fwd.hh>
+#include <paludis/match_package-fwd.hh>
#include <tr1/memory>
namespace paludis
@@ -82,7 +84,7 @@ namespace paludis
public Generator
{
public:
- Matches(const PackageDepSpec &);
+ Matches(const PackageDepSpec &, const MatchPackageOptions &);
};
class PALUDIS_VISIBLE Package :
diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc
index 0c096f2..0acfbb1 100644
--- a/paludis/generator_TEST.cc
+++ b/paludis/generator_TEST.cc
@@ -111,7 +111,7 @@ namespace test_cases
{
MatchesGeneratorTestCase() :
GeneratorTestCaseBase("matches", generator::Matches(parse_user_package_dep_spec("cat/a",
- &env, UserPackageDepSpecOptions())))
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))
{
}
@@ -129,7 +129,7 @@ namespace test_cases
{
MatchesCatWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches cat wildcard", generator::Matches(parse_user_package_dep_spec("*/a",
- &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions()))
{
}
@@ -147,7 +147,7 @@ namespace test_cases
{
MatchesPkgWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches pkg wildcard", generator::Matches(parse_user_package_dep_spec("cat/*",
- &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions()))
{
}
@@ -168,7 +168,7 @@ namespace test_cases
MatchesAllWildcardGeneratorTestCase() :
GeneratorTestCaseBase("matches all wildcard", generator::Matches(
parse_user_package_dep_spec(">=*/*-2",
- &env, UserPackageDepSpecOptions() + updso_allow_wildcards)))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions()))
{
}
@@ -276,9 +276,9 @@ namespace test_cases
IntersectionGeneratorTestCase() :
GeneratorTestCaseBase("intersection", generator::Intersection(
generator::Matches(parse_user_package_dep_spec("*/a",
- &env, UserPackageDepSpecOptions() + updso_allow_wildcards)),
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions()),
generator::Matches(parse_user_package_dep_spec("cat/*",
- &env, UserPackageDepSpecOptions() + updso_allow_wildcards))
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards), MatchPackageOptions())
))
{
}
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index d95c857..a701c75 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -186,7 +186,7 @@ namespace
return make_shared_ptr(new DepListEntryHandledSkippedDependent(
*(*env)[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec(s.substr(1), env,
- UserPackageDepSpecOptions())))]->begin()));
+ UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin()));
case 'F':
if (s.length() != 1)
@@ -233,7 +233,7 @@ InstallTask::set_targets_from_serialisation(const std::string & format,
throw InternalError(PALUDIS_HERE, "Serialised value '" + *s + "' too short: no package_id");
const std::tr1::shared_ptr<const PackageID> package_id(*(*_imp->env)[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec(*tokens.begin(),
- _imp->env, UserPackageDepSpecOptions())))]->begin());
+ _imp->env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
tokens.pop_front();
if (tokens.empty())
@@ -410,7 +410,7 @@ InstallTask::_add_target(const std::string & target)
else
{
std::tr1::shared_ptr<const PackageIDSequence> names((*_imp->env)[selection::BestVersionOnly(
- generator::Matches(*spec) | filter::SupportsAction<InstallAction>())]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::SupportsAction<InstallAction>())]);
if (names->empty())
{
@@ -755,8 +755,8 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
generator::Matches(make_package_dep_spec()
.package(dep->package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(dep->package_id->slot())))
- .in_repository(dep->destination->name())
- ) |
+ .in_repository(dep->destination->name()),
+ MatchPackageOptions()) |
filter::SupportsAction<UninstallAction>())];
// don't clean the thing we just installed
@@ -1296,7 +1296,8 @@ namespace
void visit_leaf(const PackageDepSpec & a)
{
if (! failure)
- if ((*env)[selection::SomeArbitraryVersion(generator::Matches(a) | filter::SupportsAction<InstalledAction>())]->empty())
+ if ((*env)[selection::SomeArbitraryVersion(generator::Matches(a, MatchPackageOptions())
+ | filter::SupportsAction<InstalledAction>())]->empty())
failure.reset(new PackageDepSpec(a));
}
@@ -1472,7 +1473,7 @@ namespace
if (! d->handled)
continue;
- if (! match_package(*env, a, *d->package_id))
+ if (! match_package(*env, a, *d->package_id, MatchPackageOptions()))
continue;
CheckHandledVisitor v;
@@ -1487,7 +1488,7 @@ namespace
/* no match on the dep list, fall back to installed packages. if
* there are no matches here it's not a problem because of or-deps. */
std::tr1::shared_ptr<const PackageIDSequence> installed((*env)[selection::AllVersionsUnsorted(
- generator::Matches(a) |
+ generator::Matches(a, MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>())]);
for (PackageIDSequence::ConstIterator i(installed->begin()), i_end(installed->end()) ;
diff --git a/paludis/match_package-fwd.hh b/paludis/match_package-fwd.hh
new file mode 100644
index 0000000..06686d9
--- /dev/null
+++ b/paludis/match_package-fwd.hh
@@ -0,0 +1,41 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_MATCH_PACKAGE_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_MATCH_PACKAGE_FWD_HH 1
+
+#include <paludis/util/options-fwd.hh>
+#include <paludis/util/attributes.hh>
+#include <iosfwd>
+
+namespace paludis
+{
+
+#include <paludis/match_package-se.hh>
+
+ /**
+ * A set of options for match_package and match_package_in_set.
+ *
+ * \since 0.32
+ * \ingroup g_query
+ */
+ typedef Options<MatchPackageOption> MatchPackageOptions;
+}
+
+#endif
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 22a3037..9b20903 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -29,14 +29,19 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/set.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/options.hh>
#include <paludis/action.hh>
#include <paludis/repository.hh>
#include <paludis/metadata_key.hh>
#include <tr1/functional>
#include <algorithm>
+#include <istream>
+#include <ostream>
using namespace paludis;
+#include <paludis/match_package-se.cc>
+
namespace
{
struct SlotRequirementChecker :
@@ -72,7 +77,8 @@ bool
paludis::match_package(
const Environment & env,
const PackageDepSpec & spec,
- const PackageID & entry)
+ const PackageID & entry,
+ const MatchPackageOptions & options)
{
if (spec.package_ptr() && *spec.package_ptr() != entry.name())
return false;
@@ -190,12 +196,15 @@ paludis::match_package(
return false;
}
- if (spec.additional_requirements_ptr())
+ if (! options[mpo_ignore_additional_requirements])
{
- for (AdditionalPackageDepSpecRequirements::ConstIterator u(spec.additional_requirements_ptr()->begin()),
- u_end(spec.additional_requirements_ptr()->end()) ; u != u_end ; ++u)
- if (! (*u)->requirement_met(&env, entry))
- return false;
+ if (spec.additional_requirements_ptr())
+ {
+ for (AdditionalPackageDepSpecRequirements::ConstIterator u(spec.additional_requirements_ptr()->begin()),
+ u_end(spec.additional_requirements_ptr()->end()) ; u != u_end ; ++u)
+ if (! (*u)->requirement_met(&env, entry))
+ return false;
+ }
}
return true;
@@ -205,7 +214,8 @@ bool
paludis::match_package_in_set(
const Environment & env,
const SetSpecTree::ConstItem & target,
- const PackageID & entry)
+ const PackageID & entry,
+ const MatchPackageOptions & options)
{
using namespace std::tr1::placeholders;
@@ -213,6 +223,6 @@ paludis::match_package_in_set(
target.accept(f);
return indirect_iterator(f.end()) != std::find_if(
indirect_iterator(f.begin()), indirect_iterator(f.end()),
- std::tr1::bind(&match_package, std::tr1::cref(env), _1, std::tr1::cref(entry)));
+ std::tr1::bind(&match_package, std::tr1::cref(env), _1, std::tr1::cref(entry), std::tr1::cref(options)));
}
diff --git a/paludis/match_package.hh b/paludis/match_package.hh
index 0fcf84d..27172fb 100644
--- a/paludis/match_package.hh
+++ b/paludis/match_package.hh
@@ -30,6 +30,7 @@
* - \ref example_match_package.cc "example_match_package.cc"
*/
+#include <paludis/match_package-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/dep_spec-fwd.hh>
#include <paludis/dep_tree.hh>
@@ -48,7 +49,8 @@ namespace paludis
bool match_package(
const Environment & env,
const PackageDepSpec & spec,
- const PackageID & target)
+ const PackageID & target,
+ const MatchPackageOptions & options)
PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
/**
@@ -62,7 +64,8 @@ namespace paludis
bool match_package_in_set(
const Environment & env,
const SetSpecTree::ConstItem & spec,
- const PackageID & target)
+ const PackageID & target,
+ const MatchPackageOptions & options)
PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
}
diff --git a/paludis/match_package.se b/paludis/match_package.se
new file mode 100644
index 0000000..bd6b7e5
--- /dev/null
+++ b/paludis/match_package.se
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et ft=sh :
+
+make_enum_MatchPackageOption()
+{
+ prefix mpo
+ want_destringify
+
+ key mpo_ignore_additional_requirements "Ignore additional requirements"
+
+ doxygen_comment << "END"
+ /**
+ * Options for match_package and match_package_in_set.
+ *
+ * \since 0.32
+ * \ingroup g_query
+ */
+END
+}
+
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 6bda3a9..5435c40 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -245,7 +245,7 @@ PackageDatabase::fetch_unique_qualified_package_name(const PackageNamePart & p,
std::set<std::pair<CategoryNamePart, RepositoryName>, CategoryRepositoryNamePairComparator> checked;
std::tr1::shared_ptr<const PackageIDSequence> pkgs((*_imp->environment)[selection::AllVersionsUnsorted(
- generator::Matches(make_package_dep_spec().package_name_part(p)) | f)]);
+ generator::Matches(make_package_dep_spec().package_name_part(p), MatchPackageOptions()) | f)]);
for (IndirectIterator<PackageIDSequence::ConstIterator> it(pkgs->begin()),
it_end(pkgs->end()); it_end != it; ++it)
diff --git a/paludis/query_visitor.cc b/paludis/query_visitor.cc
index dd7560d..7b75dae 100644
--- a/paludis/query_visitor.cc
+++ b/paludis/query_visitor.cc
@@ -88,7 +88,8 @@ QueryVisitor::visit_leaf(const PackageDepSpec & a)
// TODO: check destinations
std::tr1::shared_ptr<const PackageIDSequence> matches((*_imp->environment)[selection::AllVersionsUnsorted(
- generator::Matches(a) | filter::InstalledAtRoot(_imp->environment->root()))]);
+ generator::Matches(a, _imp->dep_list->options()->match_package_options) |
+ filter::InstalledAtRoot(_imp->environment->root()))]);
if (indirect_iterator(matches->end()) != std::find_if(indirect_iterator(matches->begin()), indirect_iterator(matches->end()),
std::tr1::bind(std::tr1::mem_fn(&DepList::replaced), _imp->dep_list, _1)))
diff --git a/paludis/report_task.cc b/paludis/report_task.cc
index 127c6d0..9204cc4 100644
--- a/paludis/report_task.cc
+++ b/paludis/report_task.cc
@@ -95,7 +95,8 @@ namespace
void
VulnerableChecker::visit_leaf(const PackageDepSpec & a)
{
- std::tr1::shared_ptr<const PackageIDSequence> insecure(_env[selection::AllVersionsSorted(generator::Matches(a))]);
+ std::tr1::shared_ptr<const PackageIDSequence> insecure(_env[selection::AllVersionsSorted(
+ generator::Matches(a, MatchPackageOptions()))]);
for (PackageIDSequence::ConstIterator i(insecure->begin()),
i_end(insecure->end()) ; i != i_end ; ++i)
if (a.tag() && visitor_cast<const GLSADepTag>(*a.tag()))
@@ -206,12 +207,12 @@ ReportTask::execute()
{
std::tr1::shared_ptr<const PackageIDSequence> installable(
(*e)[selection::BestVersionOnly((
- generator::InRepository(RepositoryName(*o)) &
- generator::Matches(make_package_dep_spec()
- .package((*v)->name())
- .version_requirement(VersionRequirement(vo_equal, (*v)->version()))
- )) |
- filter::SupportsAction<InstallAction>())]);
+ (generator::InRepository(RepositoryName(*o)) &
+ generator::Matches(make_package_dep_spec()
+ .package((*v)->name())
+ .version_requirement(VersionRequirement(vo_equal, (*v)->version())),
+ MatchPackageOptions())) |
+ filter::SupportsAction<InstallAction>()))]);
if (! installable->empty())
{
diff --git a/paludis/repositories/cran/dep_spec_pretty_printer.cc b/paludis/repositories/cran/dep_spec_pretty_printer.cc
index 26f2f20..e369a1a 100644
--- a/paludis/repositories/cran/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/cran/dep_spec_pretty_printer.cc
@@ -22,6 +22,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/options.hh>
#include <paludis/environment.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -83,10 +84,10 @@ DepSpecPrettyPrinter::visit_leaf(const PackageDepSpec & p)
if (_imp->env)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
_imp->s << _imp->formatter.format(p, format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
_imp->s << _imp->formatter.format(p, format::Installable());
else
diff --git a/paludis/repositories/e/dep_spec_pretty_printer.cc b/paludis/repositories/e/dep_spec_pretty_printer.cc
index 5a55061..d51e161 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/e/dep_spec_pretty_printer.cc
@@ -28,6 +28,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/set.hh>
+#include <paludis/util/options.hh>
#include <paludis/environment.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -322,10 +323,10 @@ DepSpecPrettyPrinter::visit_leaf(const PackageDepSpec & p)
if (_imp->env && _imp->check_conditions)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
_imp->s << _imp->formatter.format(p, format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
_imp->s << _imp->formatter.format(p, format::Installable());
else
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 7dad627..d8784ab 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -604,7 +604,7 @@ ERepository::repository_masked(const PackageID & id) const
else
for (std::list<std::pair<std::tr1::shared_ptr<const PackageDepSpec>, std::tr1::shared_ptr<const RepositoryMaskInfo> > >::const_iterator
k(r->second.begin()), k_end(r->second.end()) ; k != k_end ; ++k)
- if (match_package(*_imp->params.environment, *k->first, id))
+ if (match_package(*_imp->params.environment, *k->first, id, MatchPackageOptions()))
return k->second;
return std::tr1::shared_ptr<const RepositoryMaskInfo>();
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 1d215a2..2187732 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -480,7 +480,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI")));
@@ -499,7 +499,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id2->end_metadata() != id2->find_metadata("EAPI"));
TEST_CHECK(id2->short_description_key());
@@ -515,7 +515,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id3(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-3",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id3->end_metadata() != id3->find_metadata("EAPI"));
TEST_CHECK(id3->short_description_key());
@@ -562,7 +562,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK_EQUAL(std::tr1::static_pointer_cast<const erepository::ERepositoryID>(id1)->eapi()->name(), "UNKNOWN");
@@ -605,13 +605,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
test_choice(p1, "flag1", true, true, false);
test_choice(p1, "flag2", false, false, true);
@@ -678,29 +678,29 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-18",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-18",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-18",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-18",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-19",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-2::test-repo-19",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-3::test-repo-19",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-4::test-repo-19",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
}
} test_e_repository_repository_masks;
@@ -729,13 +729,13 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/masked-0",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/not_masked-0",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
}
}
} test_e_repository_query_profile_masks;
@@ -761,15 +761,15 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions()))))]->begin())->masked());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
}
} test_e_repository_invalidate_masks;
@@ -924,7 +924,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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 Short Description");
@@ -935,7 +935,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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);
@@ -947,7 +947,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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());
@@ -958,7 +958,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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());
@@ -968,7 +968,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(unfetchable_files_id);
TEST_CHECK_THROWS(unfetchable_files_id->perform_action(action), FetchActionError);
}
@@ -976,7 +976,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(no_files_restricted_id);
no_files_restricted_id->perform_action(action);
}
@@ -984,7 +984,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(fetched_files_restricted_id);
fetched_files_restricted_id->perform_action(action);
}
@@ -992,7 +992,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(fetchable_files_restricted_id);
TEST_CHECK_THROWS(fetchable_files_restricted_id->perform_action(action), FetchActionError);
}
@@ -1025,7 +1025,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
repo->make_manifest(id->name());
id->perform_action(action);
@@ -1098,7 +1098,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
}
#endif
@@ -1107,7 +1107,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1116,7 +1116,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1125,7 +1125,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1134,7 +1134,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1143,7 +1143,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1152,7 +1152,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1161,7 +1161,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1170,7 +1170,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1179,7 +1179,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1188,7 +1188,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1197,7 +1197,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1206,7 +1206,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1215,7 +1215,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1224,7 +1224,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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);
@@ -1234,7 +1234,7 @@ namespace test_cases
TestMessageSuffix suffix("doman 0", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
@@ -1244,7 +1244,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_prepare 0", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
@@ -1254,7 +1254,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_configure 0", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
@@ -1264,7 +1264,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1273,7 +1273,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1282,7 +1282,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1291,7 +1291,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1300,7 +1300,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1352,7 +1352,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1362,7 +1362,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1372,7 +1372,7 @@ namespace test_cases
TestMessageSuffix suffix("doman 1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1382,7 +1382,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_prepare 1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1392,7 +1392,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_configure 1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
@@ -1445,7 +1445,7 @@ namespace test_cases
TestMessageSuffix suffix("econf source 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1455,7 +1455,7 @@ namespace test_cases
TestMessageSuffix suffix("doman 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1465,7 +1465,7 @@ namespace test_cases
TestMessageSuffix suffix("src_prepare 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
@@ -1475,7 +1475,7 @@ namespace test_cases
TestMessageSuffix suffix("src_configure 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
@@ -1485,7 +1485,7 @@ namespace test_cases
TestMessageSuffix suffix("default src_configure 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_configure-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1495,7 +1495,7 @@ namespace test_cases
TestMessageSuffix suffix("default src_compile 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_compile-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1505,7 +1505,7 @@ namespace test_cases
TestMessageSuffix suffix("default_src_compile 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_compile-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1515,7 +1515,7 @@ namespace test_cases
TestMessageSuffix suffix("src_compile via default function 2", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_compile-via-default-func-2",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
@@ -1568,7 +1568,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1578,7 +1578,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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);
@@ -1588,7 +1588,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "UNKNOWN");
}
@@ -1597,7 +1597,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1607,7 +1607,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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);
@@ -1617,7 +1617,7 @@ namespace test_cases
TestMessageSuffix suffix("doman kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-kdebuild-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1627,7 +1627,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_prepare kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-kdebuild-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1637,7 +1637,7 @@ namespace test_cases
TestMessageSuffix suffix("no src_configure kdebuild-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-kdebuild-1",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1687,7 +1687,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
id->perform_action(action);
@@ -1697,7 +1697,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->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);
@@ -1769,7 +1769,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1778,7 +1778,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1787,7 +1787,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1796,7 +1796,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1805,7 +1805,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1814,7 +1814,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1823,7 +1823,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1832,7 +1832,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1841,7 +1841,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1850,7 +1850,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1859,7 +1859,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1868,7 +1868,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1877,7 +1877,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1886,7 +1886,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1895,7 +1895,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1904,7 +1904,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1913,7 +1913,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1922,7 +1922,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1931,7 +1931,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1940,7 +1940,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1949,7 +1949,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1958,7 +1958,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1967,7 +1967,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1976,7 +1976,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -1985,7 +1985,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1994,7 +1994,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2003,7 +2003,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2012,7 +2012,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2021,7 +2021,7 @@ namespace test_cases
TestMessageSuffix suffix("herebin success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/herebin-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2030,7 +2030,7 @@ namespace test_cases
TestMessageSuffix suffix("herebin fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/herebin-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2039,7 +2039,7 @@ namespace test_cases
TestMessageSuffix suffix("hereconfd success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2048,7 +2048,7 @@ namespace test_cases
TestMessageSuffix suffix("hereconfd fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2057,7 +2057,7 @@ namespace test_cases
TestMessageSuffix suffix("hereenvd success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2066,7 +2066,7 @@ namespace test_cases
TestMessageSuffix suffix("hereenvd fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2075,7 +2075,7 @@ namespace test_cases
TestMessageSuffix suffix("hereinitd success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2084,7 +2084,7 @@ namespace test_cases
TestMessageSuffix suffix("hereinitd fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2093,7 +2093,7 @@ namespace test_cases
TestMessageSuffix suffix("hereins success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereins-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2102,7 +2102,7 @@ namespace test_cases
TestMessageSuffix suffix("hereins fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereins-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2111,7 +2111,7 @@ namespace test_cases
TestMessageSuffix suffix("heresbin success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-success",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2120,7 +2120,7 @@ namespace test_cases
TestMessageSuffix suffix("heresbin fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-fail",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2129,7 +2129,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2138,7 +2138,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2147,7 +2147,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2156,7 +2156,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2165,7 +2165,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2174,7 +2174,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2183,7 +2183,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2192,7 +2192,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2201,7 +2201,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Short Description");
@@ -2212,7 +2212,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2221,7 +2221,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2230,7 +2230,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2239,7 +2239,7 @@ namespace test_cases
TestMessageSuffix suffix("doman success", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-success-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2248,7 +2248,7 @@ namespace test_cases
TestMessageSuffix suffix("doman nofatal", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-nonfatal-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
}
@@ -2257,7 +2257,7 @@ namespace test_cases
TestMessageSuffix suffix("doman failure", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-failure-0",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -2285,7 +2285,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
StringifyFormatter ff;
@@ -2359,7 +2359,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",
- &env, UserPackageDepSpecOptions()))))]->last());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
id->perform_action(action);
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
index a0629b5..06ee2b0 100644
--- a/paludis/repositories/e/e_repository_news.cc
+++ b/paludis/repositories/e/e_repository_news.cc
@@ -143,7 +143,7 @@ ERepositoryNews::update_news() const
generator::Matches(PackageDepSpec(parse_elike_package_dep_spec(*i,
erepository::EAPIData::get_instance()->eapi_from_string(
_imp->e_repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
- std::tr1::shared_ptr<const PackageID>()))) |
+ std::tr1::shared_ptr<const PackageID>())), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>())]->empty())
local_show = true;
show &= local_show;
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index 0ca03bb..a3f3964 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -746,7 +746,7 @@ ERepositoryProfile::use_masked(
for (PackageFlagStatusMapList::const_iterator g(i->package_use_mask.begin()),
g_end(i->package_use_mask.end()) ; g != g_end ; ++g)
{
- if (! match_package(*_imp->env, *g->first, *id))
+ if (! match_package(*_imp->env, *g->first, *id, MatchPackageOptions()))
continue;
FlagStatusMap::const_iterator h(g->second.find(value_prefixed));
@@ -782,7 +782,7 @@ ERepositoryProfile::use_forced(
for (PackageFlagStatusMapList::const_iterator g(i->package_use_force.begin()),
g_end(i->package_use_force.end()) ; g != g_end ; ++g)
{
- if (! match_package(*_imp->env, *g->first, *id))
+ if (! match_package(*_imp->env, *g->first, *id, MatchPackageOptions()))
continue;
FlagStatusMap::const_iterator h(g->second.find(value_prefixed));
@@ -811,7 +811,7 @@ ERepositoryProfile::use_state_ignoring_masks(
for (PackageFlagStatusMapList::const_iterator g(i->package_use.begin()),
g_end(i->package_use.end()) ; g != g_end ; ++g)
{
- if (! match_package(*_imp->env, *g->first, *id))
+ if (! match_package(*_imp->env, *g->first, *id, MatchPackageOptions()))
continue;
FlagStatusMap::const_iterator h(g->second.find(value_prefixed));
@@ -881,7 +881,7 @@ ERepositoryProfile::profile_masked(const PackageID & id) const
{
for (std::list<std::pair<std::tr1::shared_ptr<const PackageDepSpec>, std::tr1::shared_ptr<const RepositoryMaskInfo> > >::const_iterator k(rr->second.begin()),
k_end(rr->second.end()) ; k != k_end ; ++k)
- if (match_package(*_imp->env, *k->first, id))
+ if (match_package(*_imp->env, *k->first, id, MatchPackageOptions()))
return k->second;
}
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index b830628..8fbb479 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -301,7 +301,8 @@ ERepositorySets::security_set(bool insecurity) const
(*_imp->environment)[selection::AllVersionsSorted(
generator::Matches(make_package_dep_spec()
.package(glsa_pkg->name())
- .slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement((*c)->slot(), false)))) |
+ .slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement((*c)->slot(), false))),
+ MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked())]);
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
index 1b06710..89b8cca 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
@@ -75,7 +75,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list");
@@ -103,7 +103,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-stale");
@@ -131,7 +131,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list-eclass");
@@ -162,7 +162,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-stale");
@@ -190,7 +190,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-wrong-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-wrong");
@@ -218,7 +218,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-gone-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-gone");
@@ -246,7 +246,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-detection-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list-detection");
@@ -274,7 +274,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash");
@@ -302,7 +302,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-empty-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "");
@@ -331,7 +331,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-stale");
@@ -359,7 +359,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "the-description-flat_hash-no-mtime");
@@ -387,7 +387,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-no-mtime-stale");
@@ -415,7 +415,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-bad-mtime-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-bad-mtime");
@@ -443,7 +443,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-eapi-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-no-eapi");
@@ -471,7 +471,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-duplicate-key-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id1->short_description_key());
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-duplicate-key");
@@ -499,7 +499,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-eclass");
@@ -530,7 +530,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-stale");
@@ -558,7 +558,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-wrong-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-wrong");
@@ -585,7 +585,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-gone-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-gone");
@@ -613,7 +613,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass");
@@ -644,7 +644,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-nonstandard-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass-nonstandard");
@@ -675,7 +675,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-stale");
@@ -703,7 +703,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-wrong-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-wrong");
@@ -731,7 +731,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-gone-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-gone");
@@ -759,14 +759,14 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-truncated");
std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-2",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id2->short_description_key());
TEST_CHECK_EQUAL(id2->short_description_key()->value(), "The Generated Description flat_hash-eclasses-truncated-2");
@@ -794,7 +794,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-bad-mtime-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-bad-mtime");
@@ -822,7 +822,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-spaces-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-spaces");
@@ -851,7 +851,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib");
@@ -883,7 +883,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-percat-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib-percat");
@@ -915,7 +915,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-stale-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-stale");
@@ -944,7 +944,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-wrong-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-wrong");
@@ -973,7 +973,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-gone-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-gone");
@@ -1002,14 +1002,14 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-truncated");
std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-2",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id2->short_description_key());
TEST_CHECK_EQUAL(id2->short_description_key()->value(), "The Generated Description flat_hash-exlibs-truncated-2");
@@ -1038,7 +1038,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-bad-mtime-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-bad-mtime");
@@ -1067,7 +1067,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-spaces-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-spaces");
@@ -1102,7 +1102,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-1"));
@@ -1140,7 +1140,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-eclasses-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eclasses-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-eclasses-1"));
@@ -1177,7 +1177,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-exlibs-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id->short_description_key());
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-exlibs-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-exlibs-1"));
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index a33845f..802f6ec 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -131,7 +131,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -144,7 +144,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -157,7 +157,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-0.1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -167,7 +167,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-0::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
exndbam_repo->invalidate();
@@ -180,7 +180,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-1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -194,7 +194,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-1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -207,7 +207,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-1.1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -220,7 +220,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-2::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -234,7 +234,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
exndbam_repo->invalidate();
@@ -244,7 +244,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1.1::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
exndbam_repo->invalidate();
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 402e5dd..97dccec 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -60,7 +60,7 @@ 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",
- &env, UserPackageDepSpecOptions())))]->begin(),
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->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/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index cc0eff4..cdc595c 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -142,7 +142,7 @@ namespace
break;
std::tr1::shared_ptr<const PackageIDSequence> matches((*env)[selection::AllVersionsSorted(
- generator::Matches(s) | filter::InstalledAtRoot(FSEntry("/")))]);
+ generator::Matches(s, MatchPackageOptions()) | filter::InstalledAtRoot(FSEntry("/")))]);
if (matches->empty())
break;
diff --git a/paludis/repositories/e/info_metadata_key.cc b/paludis/repositories/e/info_metadata_key.cc
index f61ae7b..655c815 100644
--- a/paludis/repositories/e/info_metadata_key.cc
+++ b/paludis/repositories/e/info_metadata_key.cc
@@ -161,7 +161,7 @@ InfoPkgsMetadataKey::need_keys_added() const
std::tr1::shared_ptr<const PackageIDSequence> q((*_imp->env)[selection::AllVersionsSorted(
generator::Matches(parse_elike_package_dep_spec(*i,
erepository::EAPIData::get_instance()->eapi_from_string(_imp->eapi)->supported()->package_dep_spec_parse_options(),
- std::tr1::shared_ptr<const PackageID>())) |
+ std::tr1::shared_ptr<const PackageID>()), MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]);
if (q->empty())
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index 5157c7f..25a32ce 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -110,7 +110,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
PackageDepSpec spec(parse_elike_package_dep_spec(tokens[2], eapi->supported()->package_dep_spec_parse_options(), package_id));
std::tr1::shared_ptr<const PackageIDSequence> entries((*environment)[selection::AllVersionsSorted(
- generator::Matches(spec) | filter::InstalledAtRoot(environment->root()))]);
+ generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(environment->root()))]);
if (eapi->supported()->pipe_commands()->rewrite_virtuals() && (! entries->empty()) &&
(*entries->last())->virtual_for_key())
{
@@ -149,7 +149,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
PackageDepSpec spec(parse_elike_package_dep_spec(tokens[2], eapi->supported()->package_dep_spec_parse_options(), package_id));
std::tr1::shared_ptr<const PackageIDSequence> entries((*environment)[selection::SomeArbitraryVersion(
- generator::Matches(spec) | filter::InstalledAtRoot(environment->root()))]);
+ generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(environment->root()))]);
if (entries->empty())
return "O1;";
else
@@ -171,7 +171,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
PackageDepSpec spec(parse_elike_package_dep_spec(tokens[2], eapi->supported()->package_dep_spec_parse_options(), package_id));
std::tr1::shared_ptr<const PackageIDSequence> entries((*environment)[selection::AllVersionsSorted(
- generator::Matches(spec) | filter::InstalledAtRoot(environment->root()))]);
+ generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(environment->root()))]);
if (eapi->supported()->pipe_commands()->rewrite_virtuals() && (! entries->empty()))
{
std::tr1::shared_ptr<PackageIDSequence> new_entries(new PackageIDSequence);
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index 3c778e0..0b1d00e 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -143,7 +143,8 @@ namespace
}
const std::tr1::shared_ptr<const PackageIDSequence> matches((*env)[selection::AllVersionsSorted(
- generator::Matches(*p) | filter::SupportsAction<InstallAction>())]);
+ generator::Matches(*p, MatchPackageOptions() + mpo_ignore_additional_requirements)
+ | filter::SupportsAction<InstallAction>())]);
if (matches->empty())
{
if (reporter)
diff --git a/paludis/repositories/e/qa/visibility_TEST.cc b/paludis/repositories/e/qa/visibility_TEST.cc
index 08465ff..295493f 100644
--- a/paludis/repositories/e/qa/visibility_TEST.cc
+++ b/paludis/repositories/e/qa/visibility_TEST.cc
@@ -95,7 +95,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/visible-1", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r1;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r1, &env, repo, id1, "visibility"));
TEST_CHECK_EQUAL(r1.count, 0u);
@@ -103,7 +103,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/visible-2", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r2;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r2, &env, repo, id2, "visibility"));
TEST_CHECK_EQUAL(r2.count, 0u);
@@ -111,7 +111,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/masked-1", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r3;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r3, &env, repo, id3, "visibility"));
TEST_CHECK_EQUAL(r3.count, 0u);
@@ -119,7 +119,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/needs-masked-1", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r4;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r4, &env, repo, id4, "visibility"));
TestMessageSuffix s4(r4.messages);
@@ -128,7 +128,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-1", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r5;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r5, &env, repo, id5, "visibility"));
TestMessageSuffix s5(r5.messages);
@@ -137,7 +137,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-2", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r6;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r6, &env, repo, id6, "visibility"));
TestMessageSuffix s6(r6.messages);
@@ -146,7 +146,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-3", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r7;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r7, &env, repo, id7, "visibility"));
TEST_CHECK_EQUAL(r7.count, 0u);
@@ -154,7 +154,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-4", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r8;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r8, &env, repo, id8, "visibility"));
TEST_CHECK_EQUAL(r8.count, 0u);
@@ -162,7 +162,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-5", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TestReporter r9;
TEST_CHECK(visibility_check(FSEntry("/var/empty"), r9, &env, repo, id9, "visibility"));
TEST_CHECK_EQUAL(r9.count, 0u);
@@ -170,7 +170,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", &env, UserPackageDepSpecOptions())))]->begin());
+ "=cat-one/use-masking-6", &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->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_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 474d90e..215ab60 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -133,7 +133,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(e1->choices_key());
TEST_CHECK(e1->choices_key()->value());
@@ -219,7 +219,7 @@ namespace test_cases
std::tr1::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
ContentsGatherer gatherer;
std::for_each(indirect_iterator(e1->contents_key()->value()->begin()),
indirect_iterator(e1->contents_key()->value()->end()),
@@ -274,7 +274,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
StringifyFormatter ff;
@@ -362,7 +362,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -373,7 +373,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -384,7 +384,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(info_action);
}
@@ -393,7 +393,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(config_action);
}
@@ -402,7 +402,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(uninstall_action);
}
@@ -477,7 +477,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -488,7 +488,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(install_action);
}
@@ -499,7 +499,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(info_action);
}
@@ -508,7 +508,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(config_action);
}
@@ -517,7 +517,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id);
id->perform_action(uninstall_action);
}
@@ -595,7 +595,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -610,7 +610,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -625,12 +625,12 @@ 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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -645,12 +645,12 @@ 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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -665,7 +665,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -680,7 +680,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -695,7 +695,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -712,7 +712,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -727,7 +727,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -742,7 +742,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -757,7 +757,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -770,7 +770,7 @@ namespace test_cases
TestMessageSuffix suffix("install paludis-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat3/pkg1-1::namesincrtest_src",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -785,7 +785,7 @@ namespace test_cases
TestMessageSuffix suffix("upgrade paludis-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat3/pkg1-2::namesincrtest_src",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -981,7 +981,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -992,7 +992,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1003,12 +1003,12 @@ 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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1019,7 +1019,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1030,12 +1030,12 @@ 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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1046,7 +1046,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1057,7 +1057,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1068,7 +1068,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1079,7 +1079,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1090,7 +1090,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1101,7 +1101,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1112,7 +1112,7 @@ namespace test_cases
TestMessageSuffix suffix("install paludis-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat2/pkg1-1::providesincrtest_src1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1123,7 +1123,7 @@ namespace test_cases
TestMessageSuffix suffix("upgrade paludis-1", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat2/pkg1-2::providesincrtest_src1",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1213,7 +1213,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1225,7 +1225,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1237,7 +1237,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",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1308,7 +1308,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1321,7 +1321,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1334,7 +1334,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-0.1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1344,7 +1344,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-0::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
@@ -1357,7 +1357,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-1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1371,7 +1371,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-1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1384,7 +1384,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-1.1::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1397,7 +1397,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-2::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1411,7 +1411,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-0::postinsttest",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
id->perform_action(install_action);
vdb_repo->invalidate();
@@ -1421,7 +1421,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg-1.1::installed",
- &env, UserPackageDepSpecOptions()))))]->begin());
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
inst_id->perform_action(uninstall_action);
vdb_repo->invalidate();
diff --git a/paludis/repositories/unpackaged/dep_printer.cc b/paludis/repositories/unpackaged/dep_printer.cc
index 70e9176..a325a1e 100644
--- a/paludis/repositories/unpackaged/dep_printer.cc
+++ b/paludis/repositories/unpackaged/dep_printer.cc
@@ -21,6 +21,7 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/options.hh>
#include <paludis/environment.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -81,10 +82,10 @@ DepPrinter::visit_leaf(const PackageDepSpec & p)
if (_imp->env)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
_imp->s << _imp->formatter.format(p, format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p) |
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
_imp->s << _imp->formatter.format(p, format::Installable());
else
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index b33c7da..c6d7e94 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -128,7 +128,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TEST_CHECK_EQUAL(id1->version(), VersionSpec("1"));
TEST_CHECK_EQUAL(id1->slot(), SlotName("0"));
@@ -146,7 +146,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:1",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TEST_CHECK_EQUAL(id2->version(), VersionSpec("2"));
TEST_CHECK_EQUAL(id2->slot(), SlotName("1"));
@@ -182,13 +182,13 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->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",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TEST_CHECK(! id2->masked());
}
@@ -219,7 +219,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:1",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
TEST_CHECK(! id1->supports_action(SupportsActionTest<InstallAction>()));
TEST_CHECK(! id1->supports_action(SupportsActionTest<ConfigAction>()));
@@ -308,7 +308,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred",
- &env, UserPackageDepSpecOptions())))]->begin());
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
UninstallAction action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>("")
@@ -550,7 +550,7 @@ namespace test_cases
));
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4a",
- &env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->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());
@@ -592,7 +592,7 @@ namespace test_cases
));
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4b",
- &env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
+ &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin())->perform_action(action);
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index d41a235..4fc49db 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -103,10 +103,10 @@ VirtualsDepKey::pretty_print(const DependencySpecTree::ItemFormatter & f) const
{
if (_imp->env)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->value->item()) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->value->item(), MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
return f.format(*_imp->value->item(), format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->value->item()) |
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*_imp->value->item(), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
return f.format(*_imp->value->item(), format::Installable());
else
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 89278ea..8a6eeb0 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -227,7 +227,7 @@ VirtualsRepository::need_ids() const
v(_imp->names.begin()), v_end(_imp->names.end()) ; v != v_end ; ++v)
{
std::tr1::shared_ptr<const PackageIDSequence> matches((*_imp->env)[selection::AllVersionsSorted(
- generator::Matches(*v->second) |
+ generator::Matches(*v->second, MatchPackageOptions()) |
filter::SupportsAction<InstallAction>())]);
if (matches->empty())
diff --git a/paludis/selection_TEST.cc b/paludis/selection_TEST.cc
index 6c3fb50..e39737e 100644
--- a/paludis/selection_TEST.cc
+++ b/paludis/selection_TEST.cc
@@ -64,41 +64,41 @@ namespace test_cases
TEST_CHECK(true);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d1, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q1->begin(), q1->end()), 1);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsSorted(generator::Matches(d2, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q2->begin(), q2->end()), 2);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q3(env[selection::AllVersionsSorted(generator::Matches(d3, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q3->begin(), q3->end()), 2);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q4(env[selection::AllVersionsSorted(generator::Matches(d4, MatchPackageOptions()))]);
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", &env, UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(d5))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(d5, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q5->begin(), q5->end()), 0);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsSorted(generator::Matches(d6, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q6->begin(), q6->end()), 2);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q7(env[selection::AllVersionsSorted(generator::Matches(d7, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q7->begin(), q7->end()), 4);
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))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q8(env[selection::AllVersionsSorted(generator::Matches(d8, MatchPackageOptions()))]);
TEST_CHECK_EQUAL(std::distance(q8->begin(), q8->end()), 0);
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)
+ const std::tr1::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsSorted(generator::Matches(d9, MatchPackageOptions())
| filter::SupportsAction<InstallAction>())]);
TEST_CHECK_EQUAL(std::distance(q9->begin(), q9->end()), 1);
}
@@ -128,19 +128,19 @@ namespace test_cases
PackageDepSpec d(parse_user_package_dep_spec("cat/pkg", &env, UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q1(env[selection::AllVersionsSorted(generator::Matches(d, MatchPackageOptions()))]);
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(env[selection::AllVersionsGroupedBySlot(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q2(env[selection::AllVersionsGroupedBySlot(generator::Matches(d, MatchPackageOptions()))]);
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(env[selection::BestVersionOnly(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q3(env[selection::BestVersionOnly(generator::Matches(d, MatchPackageOptions()))]);
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(env[selection::BestVersionInEachSlot(generator::Matches(d))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q4(env[selection::BestVersionInEachSlot(generator::Matches(d, MatchPackageOptions()))]);
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");
@@ -151,31 +151,31 @@ namespace test_cases
PackageDepSpec c(parse_user_package_dep_spec("cat/*", &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
- const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q5(env[selection::AllVersionsSorted(generator::Matches(c, MatchPackageOptions()))]);
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(env[selection::AllVersionsGroupedBySlot(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q6(env[selection::AllVersionsGroupedBySlot(generator::Matches(c, MatchPackageOptions()))]);
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(env[selection::BestVersionOnly(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q7(env[selection::BestVersionOnly(generator::Matches(c, MatchPackageOptions()))]);
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(env[selection::BestVersionInEachSlot(generator::Matches(c))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q8(env[selection::BestVersionInEachSlot(generator::Matches(c, MatchPackageOptions()))]);
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", &env, UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsGroupedBySlot(generator::Matches(b))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q9(env[selection::AllVersionsGroupedBySlot(generator::Matches(b, MatchPackageOptions()))]);
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]", &env, UserPackageDepSpecOptions()));
- const std::tr1::shared_ptr<const PackageIDSequence> q10(env[selection::AllVersionsGroupedBySlot(generator::Matches(a))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> q10(env[selection::AllVersionsGroupedBySlot(generator::Matches(a, MatchPackageOptions()))]);
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.cc b/paludis/set_file.cc
index c7e19e4..c8da529 100644
--- a/paludis/set_file.cc
+++ b/paludis/set_file.cc
@@ -277,7 +277,8 @@ namespace
else if (! (*params.environment)[selection::SomeArbitraryVersion(generator::Matches(
make_package_dep_spec()
.package(*spec->package_ptr())
- .slot_requirement(spec->slot_requirement_ptr())) |
+ .slot_requirement(spec->slot_requirement_ptr()),
+ MatchPackageOptions()) |
filter::InstalledAtRoot(params.environment->root()))]->empty())
result->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
diff --git a/paludis/show_suggest_visitor.cc b/paludis/show_suggest_visitor.cc
index b626b83..55aacc3 100644
--- a/paludis/show_suggest_visitor.cc
+++ b/paludis/show_suggest_visitor.cc
@@ -188,7 +188,8 @@ ShowSuggestVisitor::visit_leaf(const PackageDepSpec & a)
ConditionTracker(_imp->conditions).add_condition(a) : _imp->conditions);
std::tr1::shared_ptr<const PackageIDSequence> installed_matches((*_imp->environment)[selection::AllVersionsSorted(
- generator::Matches(a) | filter::SupportsAction<InstalledAction>())]);
+ generator::Matches(a, _imp->dep_list->options()->match_package_options)
+ | filter::SupportsAction<InstalledAction>())]);
if (! installed_matches->empty())
{
Log::get_instance()->message("dep_list.show_suggest_visitor.already_installed", ll_debug, lc_context)
@@ -199,7 +200,8 @@ ShowSuggestVisitor::visit_leaf(const PackageDepSpec & a)
}
std::tr1::shared_ptr<const PackageIDSequence> matches((*_imp->environment)[selection::AllVersionsSorted(
- generator::Matches(a) | filter::SupportsAction<InstallAction>())]);
+ generator::Matches(a, _imp->dep_list->options()->match_package_options)
+ | filter::SupportsAction<InstallAction>())]);
if (matches->empty())
{
Log::get_instance()->message("dep_list.show_suggest_visitor.nothing_found", ll_warning, lc_context)
diff --git a/paludis/uninstall_list.cc b/paludis/uninstall_list.cc
index aa86372..fd566e3 100644
--- a/paludis/uninstall_list.cc
+++ b/paludis/uninstall_list.cc
@@ -291,8 +291,8 @@ namespace
std::tr1::shared_ptr<const PackageIDSequence> m(
best_only ?
- (*env)[selection::BestVersionOnly(generator::Matches(a) | filter::InstalledAtRoot(env->root()))] :
- (*env)[selection::AllVersionsSorted(generator::Matches(a) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::BestVersionOnly(generator::Matches(a, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))] :
+ (*env)[selection::AllVersionsSorted(generator::Matches(a, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
for (PackageIDSequence::ConstIterator it = m->begin(), it_end = m->end();
it_end != it; ++it)
matches->insert(DepTagEntry(std::tr1::shared_ptr<const DepTag>(new DependencyDepTag(*it, a, conditions)), 0));
@@ -440,7 +440,7 @@ UninstallList::add_unused_dependencies()
for (PackageIDSet::ConstIterator i(unused_dependencies->begin()),
i_end(unused_dependencies->end()) ; i != i_end ; ++i)
{
- if (match_package_in_set(*_imp->env, *world, **i))
+ if (match_package_in_set(*_imp->env, *world, **i, MatchPackageOptions()))
continue;
if (_imp->uninstall_list.end() != std::find_if(_imp->uninstall_list.begin(),
@@ -517,7 +517,7 @@ UninstallList::collect_world() const
for (PackageIDSet::ConstIterator i(everything->begin()),
i_end(everything->end()) ; i != i_end ; ++i)
{
- if (match_package_in_set(*_imp->env, *world, **i))
+ if (match_package_in_set(*_imp->env, *world, **i, MatchPackageOptions()))
result->insert(*i);
}
diff --git a/paludis/uninstall_task.cc b/paludis/uninstall_task.cc
index e03c8ca..0bc0032 100644
--- a/paludis/uninstall_task.cc
+++ b/paludis/uninstall_task.cc
@@ -170,7 +170,7 @@ UninstallTask::add_target(const std::string & target)
{
/* blech. wildcards. */
std::tr1::shared_ptr<const PackageIDSequence> names((*_imp->env)[selection::BestVersionOnly(
- generator::Matches(*pds) | filter::SupportsAction<UninstallAction>())]);
+ generator::Matches(*pds, MatchPackageOptions()) | filter::SupportsAction<UninstallAction>())]);
if (names->empty())
{
/* no match. we'll get an error from this later anyway. */
@@ -244,7 +244,7 @@ UninstallTask::execute()
Context local_context("When looking for target '" + stringify(**t) + "':");
std::tr1::shared_ptr<const PackageIDSequence> r((*_imp->env)[selection::AllVersionsSorted(
- generator::Matches(**t) |
+ generator::Matches(**t, MatchPackageOptions()) |
filter::SupportsAction<UninstallAction>())]);
if (r->empty())
{
@@ -309,7 +309,7 @@ UninstallTask::execute()
{
bool remove(true);
std::tr1::shared_ptr<const PackageIDSequence> installed((*_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(make_package_dep_spec().package(i->first)) |
+ generator::Matches(make_package_dep_spec().package(i->first), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>()
)]);
for (PackageIDSequence::ConstIterator r(installed->begin()), r_end(installed->end()) ;
diff --git a/python/Makefile.am b/python/Makefile.am
index c99f6eb..d518361 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -69,6 +69,7 @@ IF_PYTHON_SOURCES = \
fs_entry.cc \
generator.cc \
mask.cc \
+ match_package.cc \
metadata_key.cc \
mutex.hh mutex.cc \
name.cc \
diff --git a/python/generator.cc b/python/generator.cc
index 59b30f0..80d771d 100644
--- a/python/generator.cc
+++ b/python/generator.cc
@@ -62,7 +62,7 @@ void expose_generator()
bp::class_<generator::Matches, bp::bases<Generator> > generator_matches(
"Matches",
"Generate matching packages.",
- bp::init<const PackageDepSpec &>("__init__(spec)")
+ bp::init<const PackageDepSpec &, const MatchPackageOptions &>("__init__(spec, MatchPackageOptions)")
);
bp::class_<generator::Intersection, bp::bases<Generator> > generator_intersection(
diff --git a/python/generator_TEST.py b/python/generator_TEST.py
index f0e230e..4d8b0de 100644
--- a/python/generator_TEST.py
+++ b/python/generator_TEST.py
@@ -30,7 +30,13 @@ class TestCase_01_Generator(unittest.TestCase):
pass
def test_02_str(self):
+ env = TestEnvironment()
self.assertEquals(str(Generator.All()), "all packages")
+ self.assertEquals(str(Generator.Matches(parse_user_package_dep_spec("foo/bar",
+ env, []), MatchPackageOptions())), "packages matching foo/bar")
+ self.assertEquals(str(Generator.Matches(parse_user_package_dep_spec("foo/bar",
+ env, []), [MatchPackageOption.IGNORE_ADDITIONAL_REQUIREMENTS])),
+ "packages matching foo/bar (ignoring additional requirements)")
if __name__ == "__main__":
diff --git a/python/mask_TEST.py b/python/mask_TEST.py
index 853a189..73cda43 100755
--- a/python/mask_TEST.py
+++ b/python/mask_TEST.py
@@ -35,7 +35,7 @@ class TestCase_01_Masks(unittest.TestCase):
def test_01_user_mask(self):
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=masked/user-1.0", self.e, [])))
+ parse_user_package_dep_spec("=masked/user-1.0", self.e, []), []))
pid = iter(self.e[q]).next()
m = iter(pid.masks).next()
@@ -47,7 +47,7 @@ class TestCase_01_Masks(unittest.TestCase):
def test_02_unaccepted_mask(self):
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=masked/unaccepted-1.0", self.e, [])))
+ parse_user_package_dep_spec("=masked/unaccepted-1.0", self.e, []), []))
pid = iter(self.e[q]).next()
m = iter(pid.masks).next()
@@ -60,7 +60,7 @@ class TestCase_01_Masks(unittest.TestCase):
def test_03_repository_mask(self):
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=masked/repo-1.0", self.e, [])))
+ parse_user_package_dep_spec("=masked/repo-1.0", self.e, []), []))
pid = iter(self.e[q]).next()
m = iter(pid.masks).next()
@@ -77,7 +77,7 @@ class TestCase_01_Masks(unittest.TestCase):
def test_04_unsupported_mask(self):
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=masked/unsupported-1.0", self.e, [])))
+ parse_user_package_dep_spec("=masked/unsupported-1.0", self.e, []), []))
pid = iter(self.e[q]).next()
m = iter(pid.masks).next()
@@ -91,7 +91,7 @@ class TestCase_01_Masks(unittest.TestCase):
def test_05_association_mask(self):
if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=virtual/association-1.0", self.e, [])))
+ parse_user_package_dep_spec("=virtual/association-1.0", self.e, []), []))
pid = iter(self.e[q]).next()
m = iter(pid.masks).next()
@@ -165,7 +165,7 @@ class TestCase_02_Masks_subclassing(unittest.TestCase):
def associated_package(self):
e = EnvironmentFactory.instance.create("")
q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=masked/user-1.0", e, [])))
+ parse_user_package_dep_spec("=masked/user-1.0", e, []), []))
pid = iter(e[q]).next()
return pid
diff --git a/python/match_package.cc b/python/match_package.cc
new file mode 100644
index 0000000..01cdcf1
--- /dev/null
+++ b/python/match_package.cc
@@ -0,0 +1,43 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <python/paludis_python.hh>
+#include <python/exception.hh>
+#include <python/options.hh>
+#include <paludis/match_package.hh>
+
+using namespace paludis;
+using namespace paludis::python;
+namespace bp = boost::python;
+
+void expose_match_package()
+{
+ /**
+ * Enums
+ */
+ enum_auto("MatchPackageOption", last_mpo,
+ "Options for Generator.Matches and match_package");
+
+ /**
+ * Options
+ */
+ class_options<MatchPackageOptions>("MatchPackageOptions", "MatchPackageOption",
+ "Options for Generator.matches and match_package.");
+}
+
diff --git a/python/paludis_python.hh b/python/paludis_python.hh
index 735957c..fc14a19 100644
--- a/python/paludis_python.hh
+++ b/python/paludis_python.hh
@@ -187,6 +187,7 @@ void expose_fs_entry() PALUDIS_VISIBLE;
void expose_generator() PALUDIS_VISIBLE;
void expose_log() PALUDIS_VISIBLE;
void expose_mask() PALUDIS_VISIBLE;
+void expose_match_package() PALUDIS_VISIBLE;
void expose_metadata_key() PALUDIS_VISIBLE;
void expose_name() PALUDIS_VISIBLE;
void expose_package_database() PALUDIS_VISIBLE;
diff --git a/python/paludis_python_so.cc b/python/paludis_python_so.cc
index 6b9adff..0fb710b 100644
--- a/python/paludis_python_so.cc
+++ b/python/paludis_python_so.cc
@@ -46,6 +46,7 @@ BOOST_PYTHON_MODULE(paludis)
expose_environment();
expose_metadata_key();
expose_mask();
+ expose_match_package();
expose_package_id();
expose_action();
expose_package_database();
diff --git a/ruby/dep_list.cc b/ruby/dep_list.cc
index eee94e0..79d873b 100644
--- a/ruby/dep_list.cc
+++ b/ruby/dep_list.cc
@@ -154,7 +154,7 @@ namespace
/*
* call-seq:
- * DepListOptions.new(reinstall, reinstall_scm, target_type, upgrade, new_slots, fall_back, installed_deps_prem installed_deps_runtime, installed_deps_post, uninstalled_deps_pre, uninstalled_deps_runtime, uninstalled_deps_post, uninstalled_deps_suggested, suggested, circular, blocks, override_masks, dependency_tags) -> DepListOptions
+ * DepListOptions.new(reinstall, reinstall_scm, target_type, upgrade, new_slots, fall_back, installed_deps_prem installed_deps_runtime, installed_deps_post, uninstalled_deps_pre, uninstalled_deps_runtime, uninstalled_deps_post, uninstalled_deps_suggested, suggested, circular, blocks, override_masks, dependency_tags, MatchPackageOptions) -> DepListOptions
* DepListOptions.new(Hash) -> DepListOptions
* DepListOptions.new -> DepListOptions
*
@@ -182,7 +182,8 @@ namespace
* :use => DepListUseOption::Standard,
* :blocks => DepListBlocksOption::Accumulate,
* :override_masks => DepListOverrideMasksFunctions.new
- * :dependency_tags => false
+ * :dependency_tags => false,
+ * :match_package_options => MatchPackageOptions.new
* }
*/
VALUE
@@ -228,6 +229,7 @@ namespace
int value_for_blocks;
bool value_for_dependency_tags;
std::tr1::shared_ptr<DepListOverrideMasksFunctions> value_for_override_masks_functions;
+ MatchPackageOptions value_for_match_package_options;
if (1 == argc && rb_obj_is_kind_of(argv[0], rb_cHash))
{
@@ -269,6 +271,8 @@ namespace
rb_raise(rb_eArgError, "Missing Parameter: blocks");
if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("dependency_tags"))))
rb_raise(rb_eArgError, "Missing Parameter: dependency_tags");
+ if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("match_package_options"))))
+ rb_raise(rb_eArgError, "Missing Parameter: match_package_options");
value_for_reinstall =
NUM2INT(rb_hash_aref(argv[0], ID2SYM(rb_intern("reinstall"))));
value_for_reinstall_scm =
@@ -309,8 +313,10 @@ namespace
value_to_dep_list_override_masks_functions(rb_hash_aref(argv[0], ID2SYM(rb_intern("override_masks"))));
value_for_dependency_tags =
Qtrue == (rb_hash_aref(argv[0], ID2SYM(rb_intern("dependency_tags")))) ? true : false;
+ value_for_match_package_options = value_to_match_package_options(
+ rb_hash_aref(argv[0], ID2SYM(rb_intern("match_package_options"))));
}
- else if (20 == argc)
+ else if (21 == argc)
{
value_for_reinstall = NUM2INT(argv[0]);
value_for_reinstall_scm = NUM2INT(argv[1]);
@@ -332,10 +338,11 @@ namespace
value_for_blocks = NUM2INT(argv[17]);
value_for_override_masks_functions = value_to_dep_list_override_masks_functions(argv[18]);
value_for_dependency_tags = Qtrue == argv[19] ? true : false;
+ value_for_match_package_options = value_to_match_package_options(argv[20]);
}
else
{
- rb_raise(rb_eArgError, "DepListOptions expects twenty or zero arguments, but got %d",argc);
+ rb_raise(rb_eArgError, "DepListOptions expects twenty one or zero arguments, but got %d",argc);
}
if (value_for_reinstall < 0 || value_for_reinstall >= last_dl_reinstall)
@@ -396,7 +403,8 @@ namespace
static_cast<DepListUseOption>(value_for_use),
static_cast<DepListBlocksOption>(value_for_blocks),
value_for_override_masks_functions,
- value_for_dependency_tags
+ value_for_dependency_tags,
+ value_for_match_package_options
)
);
@@ -819,6 +827,42 @@ namespace
}
}
+ /*
+ * call-seq:
+ * match_package_options -> MatchPackageOptions
+ *
+ * Our match_package options.
+ */
+ VALUE
+ dep_list_options_match_package_options(VALUE self)
+ {
+ std::tr1::shared_ptr<DepListOptions> * p;
+ Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
+ return match_package_options_to_value((*p)->match_package_options);
+ }
+
+ /*
+ * call-seq:
+ * match_package_options=(MatchPackageOptions) -> Qnil
+ *
+ * Set our override masks.
+ */
+ VALUE
+ dep_list_options_match_package_options_set(VALUE self, VALUE omf)
+ {
+ std::tr1::shared_ptr<DepListOptions> * p;
+ Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
+ try
+ {
+ (*p)->match_package_options = value_to_match_package_options(omf);
+ return Qnil;
+ }
+ catch (const std::exception & e)
+ {
+ exception_to_ruby_exception(e);
+ }
+ }
+
VALUE
dep_list_init(int, VALUE *, VALUE self)
{
@@ -1383,6 +1427,9 @@ namespace
rb_define_method(c_dep_list_options, "override_masks", RUBY_FUNC_CAST(&dep_list_options_override_masks),0);
rb_define_method(c_dep_list_options, "override_masks=", RUBY_FUNC_CAST(&dep_list_options_override_masks_set),1);
+ rb_define_method(c_dep_list_options, "match_package_options", RUBY_FUNC_CAST(&dep_list_options_match_package_options), 0);
+ rb_define_method(c_dep_list_options, "match_package_options=", RUBY_FUNC_CAST(&dep_list_options_match_package_options_set), 1);
+
/*
* Document-class: Paludis::DepList
*
diff --git a/ruby/dep_list_TEST.rb b/ruby/dep_list_TEST.rb
index 96003ff..cf84579 100644
--- a/ruby/dep_list_TEST.rb
+++ b/ruby/dep_list_TEST.rb
@@ -47,7 +47,8 @@ module Paludis
DepListUseOption::Standard,
DepListBlocksOption::Accumulate,
DepListOverrideMasksFunctions.new,
- false
+ false,
+ []
)
end
@@ -72,7 +73,8 @@ module Paludis
:use => DepListUseOption::Standard,
:blocks => DepListBlocksOption::Accumulate,
:override_masks => DepListOverrideMasksFunctions.new,
- :dependency_tags => false
+ :dependency_tags => false,
+ :match_package_options => []
}
end
@@ -101,7 +103,8 @@ module Paludis
:use => DepListUseOption::TakeAll,
:blocks => DepListBlocksOption::Error,
:override_masks => DepListOverrideMasksFunctions.new,
- :dependency_tags => true
+ :dependency_tags => true,
+ :match_package_options => []
}
end
@@ -202,7 +205,8 @@ module Paludis
def test_add_bad_tree
assert_raise TypeError do
- dl.add(env[Selection::BestVersionOnly.new(Generator::Matches.new(pda))].last.build_dependencies_key.value, dd)
+ dl.add(env[Selection::BestVersionOnly.new(Generator::Matches.new(
+ pda, []))].last.build_dependencies_key.value, dd)
end
end
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index 2c5624c..d00514a 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -80,7 +80,7 @@ module Paludis
def pid
env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, []), []))].first
end
def test_accept_license
@@ -88,7 +88,7 @@ module Paludis
assert !env.accept_license('Failure', pid)
pid2 = env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/baz-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/baz-1.0::testrepo', env, []), []))].first
assert env.accept_license('GPL-2', pid2)
assert env.accept_license('Failure', pid2)
end
@@ -107,7 +107,7 @@ module Paludis
def pid
env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, []), []))].first
end
def test_accept_keywords
@@ -327,7 +327,7 @@ module Paludis
end
def test_package_database_query
- a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda))]
+ a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda, []))]
assert_kind_of Array, a
assert_equal 1, a.length
pid = a.first
@@ -336,7 +336,7 @@ module Paludis
assert_equal '1.0', pid.version.to_s
assert_equal 'testrepo', pid.repository_name
- a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda) | Filter::SupportsAction.new(InstallAction))]
+ a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda, []) | Filter::SupportsAction.new(InstallAction))]
assert_kind_of Array, a
assert_equal 1, a.length
pid = a.first
@@ -345,7 +345,7 @@ module Paludis
assert_equal '1.0', pid.version.to_s
assert_equal 'testrepo', pid.repository_name
- a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda))]
+ a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda, []))]
assert_kind_of Array, a
assert_equal 1, a.length
pid = a.first
@@ -354,7 +354,7 @@ module Paludis
assert_equal '1.0', pid.version.to_s
assert_equal 'testrepo', pid.repository_name
- a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda2) | Filter::SupportsAction.new(InstallAction))]
+ a = env[Selection::AllVersionsSorted.new(Generator::Matches.new(pda2, []) | Filter::SupportsAction.new(InstallAction))]
assert_kind_of Array, a
assert_equal 2, a.length
pid = a.shift
@@ -384,10 +384,10 @@ module Paludis
a = env[Selection::AllVersionsUnsorted.new(Generator::Matches.new(Paludis::parse_user_package_dep_spec(
- '>=foo/bar-27', env, [])))]
+ '>=foo/bar-27', env, []), []))]
assert a.empty?
- a = env[Selection::AllVersionsUnsorted.new(Generator::Matches.new(pda2) | Filter::SupportsAction.new(InstalledAction))]
+ a = env[Selection::AllVersionsUnsorted.new(Generator::Matches.new(pda2, []) | Filter::SupportsAction.new(InstalledAction))]
assert a.empty?
end
end
diff --git a/ruby/generator.cc b/ruby/generator.cc
index d225eda..6009944 100644
--- a/ruby/generator.cc
+++ b/ruby/generator.cc
@@ -109,15 +109,16 @@ namespace
}
VALUE
- generator_matches_new(VALUE self, VALUE spec_v)
+ generator_matches_new(VALUE self, VALUE spec_v, VALUE options_v)
{
Generator * ptr(0);
try
{
std::tr1::shared_ptr<const PackageDepSpec> spec(value_to_package_dep_spec(spec_v));
- ptr = new generator::Matches(*spec);
+ MatchPackageOptions options(value_to_match_package_options(options_v));
+ ptr = new generator::Matches(*spec, options);
VALUE data(Data_Wrap_Struct(self, 0, &Common<Generator>::free, ptr));
- rb_obj_call_init(data, 1, &spec_v);
+ rb_obj_call_init(data, 2, &spec_v);
return data;
}
catch (const std::exception & e)
@@ -259,7 +260,7 @@ namespace
* Generate matching packages.
*/
c_generator_matches = rb_define_class_under(c_generator_module, "Matches", c_generator);
- rb_define_singleton_method(c_generator_matches, "new", RUBY_FUNC_CAST(&generator_matches_new), 1);
+ rb_define_singleton_method(c_generator_matches, "new", RUBY_FUNC_CAST(&generator_matches_new), 2);
/*
* Document-class: Paludis::Generator::Intersection
diff --git a/ruby/generator_TEST.rb b/ruby/generator_TEST.rb
index 7756c90..e4dd336 100644
--- a/ruby/generator_TEST.rb
+++ b/ruby/generator_TEST.rb
@@ -51,13 +51,16 @@ module Paludis
def test_create
assert_nothing_raised do
- Generator::Matches.new(Paludis::parse_user_package_dep_spec("a/b", env, []))
+ Generator::Matches.new(Paludis::parse_user_package_dep_spec("a/b", env, []), [])
end
end
def test_to_s
- assert_equal Generator::Matches.new(Paludis::parse_user_package_dep_spec("a/b", env, [])).to_s,
+ assert_equal Generator::Matches.new(Paludis::parse_user_package_dep_spec("a/b", env, []), []).to_s,
"packages matching a/b"
+ assert_equal Generator::Matches.new(Paludis::parse_user_package_dep_spec("a/b", env, []),
+ [:ignore_additional_requirements]).to_s,
+ "packages matching a/b (ignoring additional requirements)"
end
end
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index c2cb6a6..c2589dd 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -78,19 +78,20 @@ namespace
* Document-method: match_package
*
* call-seq:
- * match_package(environment, package_dep_spec, package_id) -> true or false
+ * match_package(environment, package_dep_spec, package_id, options) -> true or false
*
* Return whether the specified PackageID matches the specified PackageDepSpec.
*
*/
- VALUE paludis_match_package(VALUE, VALUE en, VALUE a, VALUE t)
+ VALUE paludis_match_package(VALUE, VALUE en, VALUE a, VALUE t, VALUE o)
{
try
{
std::tr1::shared_ptr<Environment> env = value_to_environment(en);
std::tr1::shared_ptr<const PackageDepSpec> spec = value_to_package_dep_spec(a);
std::tr1::shared_ptr<const PackageID> target = value_to_package_id(t);
- return match_package(*env, *spec, *target) ? Qtrue : Qfalse;
+ MatchPackageOptions options(value_to_match_package_options(o));
+ return match_package(*env, *spec, *target, options) ? Qtrue : Qfalse;
}
catch (const std::exception & e)
{
@@ -103,19 +104,20 @@ namespace
* Document-method: match_package_in_set
*
* call-seq:
- * match_package_in_set(environment, set_spec_tree, package_id) -> true or false
+ * match_package_in_set(environment, set_spec_tree, package_id, options) -> true or false
*
* Return whether the specified PackageID matches the specified set.
*
*/
- VALUE paludis_match_package_in_set(VALUE, VALUE en, VALUE a, VALUE t)
+ VALUE paludis_match_package_in_set(VALUE, VALUE en, VALUE a, VALUE t, VALUE o)
{
try
{
std::tr1::shared_ptr<Environment> env = value_to_environment(en);
std::tr1::shared_ptr<const SetSpecTree::ConstItem> spec = value_to_dep_tree<SetSpecTree>(a);
std::tr1::shared_ptr<const PackageID> target = value_to_package_id(t);
- return match_package_in_set(*env, *spec, *target) ? Qtrue : Qfalse;
+ MatchPackageOptions options(value_to_match_package_options(o));
+ return match_package_in_set(*env, *spec, *target, options) ? Qtrue : Qfalse;
}
catch (const std::exception & e)
{
@@ -487,8 +489,8 @@ void PALUDIS_VISIBLE paludis::ruby::init()
*/
c_bad_version_operator_error = rb_define_class_under(c_paludis_module, "BadVersionOperatorError", rb_eRuntimeError);
- rb_define_module_function(c_paludis_module, "match_package", RUBY_FUNC_CAST(&paludis_match_package), 3);
- rb_define_module_function(c_paludis_module, "match_package_in_set", RUBY_FUNC_CAST(&paludis_match_package_in_set), 3);
+ rb_define_module_function(c_paludis_module, "match_package", RUBY_FUNC_CAST(&paludis_match_package), 4);
+ rb_define_module_function(c_paludis_module, "match_package_in_set", RUBY_FUNC_CAST(&paludis_match_package_in_set), 4);
rb_define_module_function(c_paludis_module, "version_spec_comparator", RUBY_FUNC_CAST(&paludis_version_spec_comparator), 3);
rb_define_const(c_paludis_module, "Version", INT2FIX(PALUDIS_VERSION));
@@ -516,8 +518,34 @@ paludis::ruby::bool_to_value(bool b)
return b ? Qtrue : Qfalse;
}
+MatchPackageOptions
+paludis::ruby::value_to_match_package_options(VALUE v)
+{
+ MatchPackageOptions o;
+ for (int i(0) ; i < RARRAY(v)->len ; ++i)
+ {
+ VALUE entry(rb_ary_entry(v, i));
+ Check_Type(entry, T_SYMBOL);
+ if (SYM2ID(entry) == rb_intern("ignore_additional_requirements"))
+ o += mpo_ignore_additional_requirements;
+ else
+ rb_raise(rb_eArgError, "Unknown MatchPackageOptions option '%s'", rb_obj_as_string(entry));
+ }
+ return o;
+}
+
+VALUE
+paludis::ruby::match_package_options_to_value(const MatchPackageOptions & o)
+{
+ VALUE a(rb_ary_new());
+ if (o[mpo_ignore_additional_requirements])
+ rb_ary_push(a, ID2SYM(rb_intern("ignore_additional_requirements")));
+ return a;
+}
+
#ifdef ENABLE_RUBY_QA
-paludis::ruby::RubyQAReporter::RubyQAReporter(VALUE* ruby_reporter) {
+paludis::ruby::RubyQAReporter::RubyQAReporter(VALUE* ruby_reporter)
+{
this->reporter = ruby_reporter;
}
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index ee94ba8..21583f6 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -105,6 +105,7 @@ namespace paludis
VALUE choices_to_value(const std::tr1::shared_ptr<const Choices> & c);
VALUE choice_to_value(const std::tr1::shared_ptr<const Choice> & c);
VALUE choice_value_to_value(const std::tr1::shared_ptr<const ChoiceValue> & c);
+ VALUE match_package_options_to_value(const MatchPackageOptions & c);
VALUE bool_to_value(bool b);
VersionSpec value_to_version_spec(VALUE v);
@@ -122,6 +123,7 @@ namespace paludis
std::tr1::shared_ptr<const Choices> value_to_choices(VALUE v);
std::tr1::shared_ptr<const Choice> value_to_choice(VALUE v);
std::tr1::shared_ptr<const ChoiceValue> value_to_choice_value(VALUE v);
+ MatchPackageOptions value_to_match_package_options(VALUE v);
bool value_to_bool(VALUE v);
Filter value_to_filter(VALUE v);
diff --git a/ruby/paludis_ruby_TEST.rb b/ruby/paludis_ruby_TEST.rb
index 3d3a7ae..8a830fc 100644
--- a/ruby/paludis_ruby_TEST.rb
+++ b/ruby/paludis_ruby_TEST.rb
@@ -42,10 +42,10 @@ module Paludis
spec_good = Paludis::parse_user_package_dep_spec('>=foo/bar-1', env, [])
spec_bad = Paludis::parse_user_package_dep_spec('>=foo/bar-2', env, [])
pid = env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, []), []))].first
- assert Paludis::match_package(env, spec_good, pid)
- assert !Paludis::match_package(env, spec_bad, pid)
+ assert Paludis::match_package(env, spec_good, pid, [])
+ assert !Paludis::match_package(env, spec_bad, pid, [])
end
@@ -53,23 +53,23 @@ module Paludis
env = EnvironmentFactory.instance.create("")
world = env.set('world')
pid = env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, []), []))].first
- assert Paludis::match_package_in_set(env, world, pid)
+ assert Paludis::match_package_in_set(env, world, pid, [])
end
def test_type_errors
env = EnvironmentFactory.instance.create("")
spec = Paludis::parse_user_package_dep_spec('>=foo/bar-1', env, [])
pid = env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, []), []))].first
assert_raise TypeError do
- Paludis::match_package(spec,spec,pid)
+ Paludis::match_package(spec,spec,pid, [])
end
assert_raise TypeError do
- Paludis::match_package(env,spec,spec)
+ Paludis::match_package(env,spec,spec, [])
end
end
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 951ae03..848052d 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -55,7 +55,7 @@ module Paludis
def p
env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-2.0::testrepo', env, [])))].first
+ Paludis::parse_user_package_dep_spec('=foo/bar-2.0::testrepo', env, []), []))].first
end
def installed_pid
@@ -184,7 +184,7 @@ module Paludis
def test_get_environment_variable
pid = env[Selection::BestVersionOnly.new(Generator::Matches.new(Paludis::parse_user_package_dep_spec(
- '=foo/bar-1.0', env, [])))].first;
+ '=foo/bar-1.0', env, []), []))].first;
assert_equal "hello", repo.get_environment_variable(pid, "TEST_ENV_VAR")
assert_equal "", repo.get_environment_variable(pid, "TEST_UNSET_ENV_VAR")
end
diff --git a/src/clients/adjutrix/downgrade_check.cc b/src/clients/adjutrix/downgrade_check.cc
index 51dd5e7..fcdaf9d 100644
--- a/src/clients/adjutrix/downgrade_check.cc
+++ b/src/clients/adjutrix/downgrade_check.cc
@@ -142,7 +142,8 @@ namespace
{
if (! env[selection::SomeArbitraryVersion(generator::Matches(make_package_dep_spec()
.package(b->first.name)
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(b->first.slot)))))]->empty())
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(b->first.slot))),
+ MatchPackageOptions()))]->empty())
{
results.insert(std::make_pair(b->first, stringify(b->second) + " -> nothing on " + desc));
exit_status |= 2;
diff --git a/src/clients/adjutrix/find_insecure_packages.cc b/src/clients/adjutrix/find_insecure_packages.cc
index 595ab12..889a9c4 100644
--- a/src/clients/adjutrix/find_insecure_packages.cc
+++ b/src/clients/adjutrix/find_insecure_packages.cc
@@ -87,7 +87,8 @@ namespace
void visit_leaf(const PackageDepSpec & a)
{
- std::tr1::shared_ptr<const PackageIDSequence> insecure(_env[selection::AllVersionsSorted(generator::Matches(a))]);
+ std::tr1::shared_ptr<const PackageIDSequence> insecure(_env[selection::AllVersionsSorted(
+ generator::Matches(a, MatchPackageOptions()))]);
for (PackageIDSequence::ConstIterator i(insecure->begin()),
i_end(insecure->end()) ; i != i_end ; ++i)
if (a.tag())
diff --git a/src/clients/adjutrix/find_reverse_deps.cc b/src/clients/adjutrix/find_reverse_deps.cc
index b89e763..5bd81c5 100644
--- a/src/clients/adjutrix/find_reverse_deps.cc
+++ b/src/clients/adjutrix/find_reverse_deps.cc
@@ -167,7 +167,8 @@ namespace
void
ReverseDepChecker::visit_leaf(const PackageDepSpec & a)
{
- std::tr1::shared_ptr<const PackageIDSequence> dep_entries((*_env)[selection::AllVersionsSorted(generator::Matches(a))]);
+ std::tr1::shared_ptr<const PackageIDSequence> dep_entries((*_env)[selection::AllVersionsSorted(
+ generator::Matches(a, MatchPackageOptions()))]);
std::tr1::shared_ptr<PackageIDSequence> matches(new PackageIDSequence);
bool header_written = false;
@@ -308,7 +309,8 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
return 5;
}
- std::tr1::shared_ptr<const PackageIDSequence> entries(env[selection::AllVersionsSorted(generator::Matches(*spec))]);
+ std::tr1::shared_ptr<const PackageIDSequence> entries(env[selection::AllVersionsSorted(generator::Matches(
+ *spec, MatchPackageOptions()))]);
int ret(0);
if (entries->empty())
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 94638ce..3879ed3 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -76,7 +76,7 @@ namespace
FindUnusedPackagesTask task(&e, &repo);
std::tr1::shared_ptr<const PackageIDSequence> packages(e[selection::AllVersionsGroupedBySlot(
generator::InRepository(repo.name()) &
- generator::Matches(make_package_dep_spec().package(package)))]);
+ generator::Matches(make_package_dep_spec().package(package), MatchPackageOptions()))]);
std::tr1::shared_ptr<const PackageIDSequence> unused(task.execute(package));
if (packages->empty())
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index 551ce55..2380af4 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -78,6 +78,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
d_options.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
d_options.override_masks->push_back(std::tr1::bind(&override_unkeyworded, &env, _1, _2));
d_options.override_masks->push_back(std::tr1::bind(&override_repository_masks, _2));
+ d_options.match_package_options += mpo_ignore_additional_requirements;
DepList d(&env, d_options);
diff --git a/src/clients/cave/cmd_print_id_contents.cc b/src/clients/cave/cmd_print_id_contents.cc
index 9255f81..4b36488 100644
--- a/src/clients/cave/cmd_print_id_contents.cc
+++ b/src/clients/cave/cmd_print_id_contents.cc
@@ -105,7 +105,7 @@ PrintIDContentsCommand::run(
UserPackageDepSpecOptions(), filter::InstalledAtRoot(env->root())));
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(spec) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
throw NothingMatching(spec);
diff --git a/src/clients/cave/cmd_print_id_metadata.cc b/src/clients/cave/cmd_print_id_metadata.cc
index ba1cc3f..b8c6633 100644
--- a/src/clients/cave/cmd_print_id_metadata.cc
+++ b/src/clients/cave/cmd_print_id_metadata.cc
@@ -139,7 +139,7 @@ PrintIDMetadataCommand::run(
PackageDepSpec spec(parse_user_package_dep_spec(*cmdline.begin_parameters(), env.get(), UserPackageDepSpecOptions()));
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(spec))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(spec, MatchPackageOptions()))]);
if (entries->empty())
throw NothingMatching(spec);
diff --git a/src/clients/cave/cmd_print_ids.cc b/src/clients/cave/cmd_print_ids.cc
index e84ca90..534a251 100644
--- a/src/clients/cave/cmd_print_ids.cc
+++ b/src/clients/cave/cmd_print_ids.cc
@@ -253,7 +253,7 @@ PrintIDsCommand::run(
m != m_end ; ++m)
{
PackageDepSpec s(parse_user_package_dep_spec(*m, env.get(), UserPackageDepSpecOptions() + updso_allow_wildcards));
- g = g & generator::Matches(s);
+ g = g & generator::Matches(s, MatchPackageOptions());
}
}
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index cdced07..8e27cf9 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -162,7 +162,7 @@ namespace
{
cout << format_general_s(f::show_wildcard_heading(), stringify(s));
- const std::tr1::shared_ptr<const PackageIDSequence> names((*env)[selection::BestVersionOnly(generator::Matches(s))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> names((*env)[selection::BestVersionOnly(generator::Matches(s, MatchPackageOptions()))]);
if (names->empty())
throw NothingMatching(s);
@@ -573,7 +573,8 @@ namespace
{
cout << format_general_s(f::show_package_heading(), stringify(s));
- const std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsGroupedBySlot(generator::Matches(s))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsGroupedBySlot(
+ generator::Matches(s, MatchPackageOptions()))]);
if (ids->empty())
throw NothingMatching(s);
@@ -657,7 +658,8 @@ namespace
const std::tr1::shared_ptr<Environment> & env,
const PackageDepSpec & s)
{
- const std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::BestVersionOnly(generator::Matches(s))]);
+ const std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::BestVersionOnly(generator::Matches(s,
+ MatchPackageOptions()))]);
if (ids->empty())
throw NothingMatching(s);
diff --git a/src/clients/cave/select_format_for_spec.cc b/src/clients/cave/select_format_for_spec.cc
index 6c2f242..a98dde4 100644
--- a/src/clients/cave/select_format_for_spec.cc
+++ b/src/clients/cave/select_format_for_spec.cc
@@ -38,9 +38,9 @@ paludis::cave::select_format_for_spec(
const std::string & if_unavailable
)
{
- if (! (*env)[selection::SomeArbitraryVersion(generator::Matches(spec) | filter::InstalledAtRoot(FSEntry("/")))]->empty())
+ if (! (*env)[selection::SomeArbitraryVersion(generator::Matches(spec, MatchPackageOptions()) | filter::InstalledAtRoot(FSEntry("/")))]->empty())
return if_installed;
- if (! (*env)[selection::SomeArbitraryVersion(generator::Matches(spec) | filter::SupportsAction<InstallAction>()
+ if (! (*env)[selection::SomeArbitraryVersion(generator::Matches(spec, MatchPackageOptions()) | filter::SupportsAction<InstallAction>()
| filter::NotMasked())]->empty())
return if_installable;
return if_unavailable;
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 658f47d..f83e3ea 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -183,7 +183,7 @@ int do_has_version(const std::tr1::shared_ptr<Environment> & env)
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
parse_user_package_dep_spec(query, env.get(), UserPackageDepSpecOptions())));
std::tr1::shared_ptr<const PackageIDSequence> entries((*env)[selection::SomeArbitraryVersion(
- generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
return_code = 1;
@@ -201,7 +201,7 @@ int do_best_version(const std::tr1::shared_ptr<Environment> & env)
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
parse_user_package_dep_spec(query, env.get(), UserPackageDepSpecOptions())));
std::tr1::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
/* make built_with_use work for virtuals... icky... */
while (! entries->empty())
@@ -242,7 +242,7 @@ int do_match(const std::tr1::shared_ptr<Environment> & env)
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
parse_user_package_dep_spec(query, env.get(), UserPackageDepSpecOptions())));
std::tr1::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
while (! entries->empty())
{
@@ -287,10 +287,10 @@ int do_environment_variable(const std::tr1::shared_ptr<Environment> & env)
parse_user_package_dep_spec(spec_str, env.get(), UserPackageDepSpecOptions())));
std::tr1::shared_ptr<const PackageIDSequence> entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
- entries = (*env)[selection::AllVersionsSorted(generator::Matches(*spec))];
+ entries = (*env)[selection::AllVersionsSorted(generator::Matches(*spec, MatchPackageOptions()))];
if (entries->empty())
throw NoSuchPackageError(spec_str);
diff --git a/src/clients/paludis/do_config.cc b/src/clients/paludis/do_config.cc
index 3879454..54685d0 100644
--- a/src/clients/paludis/do_config.cc
+++ b/src/clients/paludis/do_config.cc
@@ -75,7 +75,7 @@ namespace
filter::InstalledAtRoot(env->root()))));
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsUnsorted(generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsUnsorted(generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
throw NoSuchPackageError(target);
diff --git a/src/clients/paludis/do_contents.cc b/src/clients/paludis/do_contents.cc
index 2897e89..74bc0b8 100644
--- a/src/clients/paludis/do_contents.cc
+++ b/src/clients/paludis/do_contents.cc
@@ -99,7 +99,7 @@ do_one_contents(
filter::InstalledAtRoot(env->root()))));
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
throw NoSuchPackageError(q);
diff --git a/src/clients/paludis/do_executables.cc b/src/clients/paludis/do_executables.cc
index 96a344c..4b65854 100644
--- a/src/clients/paludis/do_executables.cc
+++ b/src/clients/paludis/do_executables.cc
@@ -129,7 +129,7 @@ do_one_executables(
filter::InstalledAtRoot(env->root()))));
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*env)[selection::AllVersionsSorted(generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]);
+ (*env)[selection::AllVersionsSorted(generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]);
if (entries->empty())
throw NoSuchPackageError(q);
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 2100eef..9d72bce 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -213,11 +213,11 @@ int do_one_info(
new PackageDepSpec(parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions())));
std::tr1::shared_ptr<const PackageIDSequence>
- entries((*env)[selection::AllVersionsSorted(generator::Matches(*spec))]),
+ entries((*env)[selection::AllVersionsSorted(generator::Matches(*spec, MatchPackageOptions()))]),
installed_entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec) | filter::InstalledAtRoot(env->root()))]),
+ generator::Matches(*spec, MatchPackageOptions()) | filter::InstalledAtRoot(env->root()))]),
installable_entries((*env)[selection::AllVersionsSorted(
- generator::Matches(*spec) | filter::SupportsAction<InstallAction>() | filter::NotMasked())]);
+ generator::Matches(*spec, MatchPackageOptions()) | filter::SupportsAction<InstallAction>() | filter::NotMasked())]);
std::tr1::shared_ptr<PackageIDSequence> to_show_entries(new PackageIDSequence);
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 18560d9..ad0e4ee 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -430,7 +430,8 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
std::tr1::shared_ptr<const PackageIDSequence> existing_repo((*environment())[selection::AllVersionsSorted(
generator::Matches(repo ?
make_package_dep_spec().package(d.package_id->name()).in_repository(*repo) :
- make_package_dep_spec().package(d.package_id->name())))]);
+ make_package_dep_spec().package(d.package_id->name()),
+ MatchPackageOptions()))]);
std::tr1::shared_ptr<const PackageIDSequence> existing_slot_repo((*environment())[selection::AllVersionsSorted(
generator::Matches(repo ?
@@ -440,8 +441,8 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
.in_repository(*repo) :
make_package_dep_spec()
.package(d.package_id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))
- ))]);
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot()))),
+ MatchPackageOptions()))]);
display_merge_list_entry_start(d, m);
display_merge_list_entry_package_name(d, m);
@@ -911,7 +912,8 @@ ConsoleInstallTask::display_merge_list_entry_repository(const DepListEntry & d,
std::tr1::shared_ptr<const PackageIDSequence> inst((*environment())[selection::BestVersionOnly(
generator::Matches(make_package_dep_spec()
.package(d.package_id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))) |
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot()))),
+ MatchPackageOptions()) |
filter::InstalledAtRoot(environment()->root()))]);
bool changed(normal_entry == m &&
! inst->empty() && (*inst->begin())->from_repositories_key() &&
@@ -1362,7 +1364,7 @@ ConsoleInstallTask::display_merge_list_entry_package_tags(const DepListEntry & d
std::tr1::shared_ptr<const PackageDepSpec> spec(
std::tr1::static_pointer_cast<const DependencyDepTag>(tag->tag)->dependency());
if (d.kind != dlk_masked && d.kind != dlk_block && (*environment())[selection::SomeArbitraryVersion(
- generator::Matches(*spec) |
+ generator::Matches(*spec, MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>())]->empty())
unsatisfied_dependents.insert(tag->tag->short_text());
else
@@ -1598,7 +1600,8 @@ ConsoleInstallTask::on_all_masked_error(const AllMaskedError & e)
{
std::tr1::shared_ptr<const PackageIDSequence> p(
(*environment())[selection::AllVersionsSorted(
- generator::Matches(e.query()) | filter::SupportsAction<InstallAction>())]);
+ generator::Matches(e.query(), MatchPackageOptions())
+ | filter::SupportsAction<InstallAction>())]);
if (p->empty())
{
output_stream() << endl;
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 3a574f0..5790d12 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -77,7 +77,7 @@ ConsoleQueryTask::show(const PackageDepSpec & a, const std::tr1::shared_ptr<cons
if (! a.package_ptr())
{
std::tr1::shared_ptr<const PackageIDSequence> entries(
- (*_imp->env)[selection::BestVersionOnly(generator::Matches(a))]);
+ (*_imp->env)[selection::BestVersionOnly(generator::Matches(a, MatchPackageOptions()))]);
if (entries->empty())
throw NoSuchPackageError(stringify(a));
@@ -100,9 +100,9 @@ ConsoleQueryTask::show_one(const PackageDepSpec & a, const std::tr1::shared_ptr<
/* prefer the best installed version, then the best visible version, then
* the best version */
std::tr1::shared_ptr<const PackageIDSequence>
- entries((*_imp->env)[selection::AllVersionsSorted(generator::Matches(a))]),
+ entries((*_imp->env)[selection::AllVersionsSorted(generator::Matches(a, MatchPackageOptions()))]),
preferred_entries((*_imp->env)[selection::AllVersionsSorted(
- generator::Matches(a) | filter::InstalledAtRoot(_imp->env->root()))]);
+ generator::Matches(a, MatchPackageOptions()) | filter::InstalledAtRoot(_imp->env->root()))]);
if (entries->empty())
throw NoSuchPackageError(stringify(a));
if (preferred_entries->empty())