aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-06 13:21:13 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-07 11:32:56 +0000
commit81ef7b0468950cade215c889d47143db21720695 (patch)
tree9fe89084961f1bbf5c35619f82d802e457443b8a /doc
parent20cc98f89f0208619fa8845d784463f03a7c9234 (diff)
downloadpaludis-81ef7b0468950cade215c889d47143db21720695.tar.gz
paludis-81ef7b0468950cade215c889d47143db21720695.tar.xz
Pass ID to match_package
Diffstat (limited to 'doc')
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec.cc3
-rw-r--r--doc/api/cplusplus/examples/example_match_package.cc2
-rw-r--r--doc/api/cplusplus/examples/example_selection.cc8
-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_mask.rb2
-rw-r--r--doc/api/ruby/example_match_package.rb2
-rw-r--r--doc/api/ruby/example_package_id.rb2
-rw-r--r--doc/api/ruby/example_selection.rb8
9 files changed, 16 insertions, 15 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc
index 0607d66e4..2e9598507 100644
--- a/doc/api/cplusplus/examples/example_dep_spec.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec.cc
@@ -141,7 +141,8 @@ int main(int argc, char * argv[])
/* And display packages matching that spec */
cout << " " << left << setw(24) << "Matches:" << " ";
- std::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(generator::Matches(spec, { }))]);
+ std::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
+ generator::Matches(spec, make_null_shared_ptr(), { }))]);
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_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc
index f689b33e7..c308f8dcd 100644
--- a/doc/api/cplusplus/examples/example_match_package.cc
+++ b/doc/api/cplusplus/examples/example_match_package.cc
@@ -55,7 +55,7 @@ int main(int argc, char * argv[])
{
/* Is it paludis? */
if (match_package(*env, make_package_dep_spec({ }).package(
- QualifiedPackageName("sys-apps/paludis")), *i, { }))
+ QualifiedPackageName("sys-apps/paludis")), *i, make_null_shared_ptr(), { }))
cout << left << setw(50) << (stringify(**i) + ":") << " " << "paludis" << endl;
/* No. Is it in system or world? */
diff --git a/doc/api/cplusplus/examples/example_selection.cc b/doc/api/cplusplus/examples/example_selection.cc
index a1669af87..ad60e36b0 100644
--- a/doc/api/cplusplus/examples/example_selection.cc
+++ b/doc/api/cplusplus/examples/example_selection.cc
@@ -63,13 +63,13 @@ int main(int argc, char * argv[])
* 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")), { })));
+ QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { })));
/* 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")), { }) |
+ QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) |
filter::InstalledAtSlash()));
/* Filters can be combined. Usually filter::NotMasked should be combined
@@ -77,7 +77,7 @@ int main(int argc, char * argv[])
* aren't masked. */
show_selection(env, selection::AllVersionsSorted(
generator::Matches(make_package_dep_spec({ }).package(
- QualifiedPackageName("sys-apps/paludis")), { }) |
+ QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
@@ -86,7 +86,7 @@ int main(int argc, char * argv[])
* 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")), { }) |
+ QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
}
diff --git a/doc/api/ruby/example_action.rb b/doc/api/ruby/example_action.rb
index 60db632fc..3e14f37f2 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, []), nil, []))]
# For each ID:
ids.each do | id |
diff --git a/doc/api/ruby/example_contents.rb b/doc/api/ruby/example_contents.rb
index 82c758d28..d653fe57a 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, []), nil, []) |
Filter::InstalledAtRoot.new("/"))]
# For each ID:
diff --git a/doc/api/ruby/example_mask.rb b/doc/api/ruby/example_mask.rb
index 2bb306d2c..e63aa9207 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, []), nil, []))]
# 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 7a448be03..c38fc98a2 100644
--- a/doc/api/ruby/example_match_package.rb
+++ b/doc/api/ruby/example_match_package.rb
@@ -28,7 +28,7 @@ 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, nil, [])
puts id.to_s.ljust(49) + ': paludis'
elsif match_package_in_set(env, system, id, [])
puts id.to_s.ljust(49) + ': system'
diff --git a/doc/api/ruby/example_package_id.rb b/doc/api/ruby/example_package_id.rb
index 0d3b2f3a8..d4350272a 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, []), nil, []))]
# For each ID:
ids.each do | id |
diff --git a/doc/api/ruby/example_selection.rb b/doc/api/ruby/example_selection.rb
index 7a61030bc..dea5b9fe6 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, []), nil, [])))
# 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, []), nil, []) |
Filter::InstalledAtRoot.new("/")))
# 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, []), nil, []) |
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, []), nil, []) |
Filter::SupportsAction.new(InstallAction) |
Filter::NotMasked.new))