aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/examples
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-13 18:02:44 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-13 18:02:44 +0100
commit68f2de2c2c795832607bfbe9249affd36faac431 (patch)
tree69be5cbe7045cca9ba271c732411f29fd750f8ce /doc/api/cplusplus/examples
parentef75cff538e62392f02391329bad533ce9adf662 (diff)
downloadpaludis-68f2de2c2c795832607bfbe9249affd36faac431.tar.gz
paludis-68f2de2c2c795832607bfbe9249affd36faac431.tar.xz
Kill InstalledAction
Diffstat (limited to 'doc/api/cplusplus/examples')
-rw-r--r--doc/api/cplusplus/examples/example_contents.cc2
-rw-r--r--doc/api/cplusplus/examples/example_dep_label.cc3
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec_flattener.cc3
-rw-r--r--doc/api/cplusplus/examples/example_match_package.cc3
-rw-r--r--doc/api/cplusplus/examples/example_package_id.cc4
-rw-r--r--doc/api/cplusplus/examples/example_selection.cc2
6 files changed, 8 insertions, 9 deletions
diff --git a/doc/api/cplusplus/examples/example_contents.cc b/doc/api/cplusplus/examples/example_contents.cc
index 57381fee3..8ddf208a9 100644
--- a/doc/api/cplusplus/examples/example_contents.cc
+++ b/doc/api/cplusplus/examples/example_contents.cc
@@ -72,7 +72,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::Package(QualifiedPackageName("sys-apps/paludis")) |
- filter::SupportsAction<InstalledAction>())]);
+ filter::InstalledAtRoot(FSEntry("/")))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_dep_label.cc b/doc/api/cplusplus/examples/example_dep_label.cc
index e6a957bfd..bc019efb4 100644
--- a/doc/api/cplusplus/examples/example_dep_label.cc
+++ b/doc/api/cplusplus/examples/example_dep_label.cc
@@ -154,7 +154,8 @@ int main(int argc, char * argv[])
/* Fetch package IDs for all installed packages. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsUnsorted(
- generator::All() | filter::SupportsAction<InstalledAction>())]);
+ generator::All() |
+ filter::InstalledAtRoot(FSEntry("/")))]);
/* Store a map from distfile name to whether it is fetch restricted. */
ResultsMap results;
diff --git a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
index 6b43d9631..06c57fbe8 100644
--- a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
@@ -43,7 +43,8 @@ int main(int argc, char * argv[])
/* Fetch package IDs for all installed packages. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::All() | filter::SupportsAction<InstalledAction>())]);
+ generator::All() |
+ filter::InstalledAtRoot(FSEntry("/")))]);
/* For each ID: */
for (PackageIDSequence::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 21b5346d3..25240a8ce 100644
--- a/doc/api/cplusplus/examples/example_match_package.cc
+++ b/doc/api/cplusplus/examples/example_match_package.cc
@@ -41,7 +41,8 @@ int main(int argc, char * argv[])
/* Fetch all installed packages. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::All() | filter::SupportsAction<InstalledAction>())]);
+ generator::All() |
+ filter::InstalledAtRoot(FSEntry("/")))]);
/* Fetch the 'system' and 'world' sets. Ordinarily we should check for
* zero pointers here, but these two sets will always exist. */
diff --git a/doc/api/cplusplus/examples/example_package_id.cc b/doc/api/cplusplus/examples/example_package_id.cc
index d05846b2c..7ed8d61ed 100644
--- a/doc/api/cplusplus/examples/example_package_id.cc
+++ b/doc/api/cplusplus/examples/example_package_id.cc
@@ -93,10 +93,6 @@ int main(int argc, char * argv[])
if ((*i)->supports_action(install_action))
actions.insert("install");
- SupportsActionTest<InstalledAction> installed_action;
- if ((*i)->supports_action(installed_action))
- actions.insert("installed");
-
SupportsActionTest<UninstallAction> uninstall_action;
if ((*i)->supports_action(uninstall_action))
actions.insert("uninstall");
diff --git a/doc/api/cplusplus/examples/example_selection.cc b/doc/api/cplusplus/examples/example_selection.cc
index 05f299d7f..5d60b1b25 100644
--- a/doc/api/cplusplus/examples/example_selection.cc
+++ b/doc/api/cplusplus/examples/example_selection.cc
@@ -70,7 +70,7 @@ int main(int argc, char * argv[])
show_selection(env, selection::AllVersionsSorted(
generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
- filter::SupportsAction<InstalledAction>()));
+ filter::InstalledAtRoot(FSEntry("/"))));
/* Filters can be combined. Usually filter::NotMasked should be combined
* with filter::SupportsAction<InstallAction>, since installed packages