aboutsummaryrefslogtreecommitdiff
path: root/doc
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 /doc
parent8ae61a8b1335efdaef0208a138b178ba221b4b18 (diff)
downloadpaludis-635179144839fa31015fe85cd9226a655d217f03.tar.gz
paludis-635179144839fa31015fe85cd9226a655d217f03.tar.xz
Add MatchPackageOptions.
Fixes: ticket:655
Diffstat (limited to 'doc')
-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
17 files changed, 27 insertions, 27 deletions
diff --git a/doc/api/cplusplus/examples/example_action.cc b/doc/api/cplusplus/examples/example_action.cc
index 2f12f2de0..4bfeb0c6f 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 428794340..31069d643 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 1b180dcb9..aaeb71247 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 fdb5a0a25..102571730 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 87625e3ac..aefbee806 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 e82f4e45a..10e310206 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 8bf1b112f..381a42622 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 78016c43a..d9b813eae 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 b048f8e61..38a2a5543 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 dcd517659..232d75317 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 79223444c..8cd500f9d 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 2b48be9ea..c748c5ce0 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 00c98ee04..ec313c329 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 0f2f2c1b0..2bb306d2c 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 e0ac15d9f..293eb7bc3 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 8420911a8..1f8eb8ac8 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 a718fc8ee..67ea70749 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))