aboutsummaryrefslogtreecommitdiff
path: root/doc/api/ruby/example_match_package.rb
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-01 13:51:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-01 13:51:46 +0000
commit87294dc0c47918934ac032e9a080e8cf386f9bf2 (patch)
tree36dc289aa22200601ec28f2d7b497cd078e34ab6 /doc/api/ruby/example_match_package.rb
parent3b9f4ed10c9eb6901f33c7037989f3b67eb5de07 (diff)
downloadpaludis-87294dc0c47918934ac032e9a080e8cf386f9bf2.tar.gz
paludis-87294dc0c47918934ac032e9a080e8cf386f9bf2.tar.xz
New Selection + Filter + Generator interface using Environment, replacing the old PackageDatabase Query. Fixes: ticket:559
Diffstat (limited to 'doc/api/ruby/example_match_package.rb')
-rw-r--r--doc/api/ruby/example_match_package.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/ruby/example_match_package.rb b/doc/api/ruby/example_match_package.rb
index 0c0d3592c..61788d1ac 100644
--- a/doc/api/ruby/example_match_package.rb
+++ b/doc/api/ruby/example_match_package.rb
@@ -17,7 +17,8 @@ exit_status = 0
env = EnvironmentMaker.instance.make_from_spec(ExampleCommandLine.instance.environment)
# Fetch all installed packages
-ids = env.package_database.query(Query::SupportsInstalledAction.new, QueryOrder::OrderByVersion);
+ids = env[Selection::AllVersionsSorted.new(
+ Generator::All.new | Filter::SupportsAction.new(InstalledAction))]
# Fetch the 'system' and 'world' sets. Ordinarily we should check for
# Nil here, but these two sets will always exist.