summaryrefslogtreecommitdiff
path: root/src/pkg_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg_view.cc')
-rw-r--r--src/pkg_view.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/pkg_view.cc b/src/pkg_view.cc
index cf2ce32e..75db20ad 100644
--- a/src/pkg_view.cc
+++ b/src/pkg_view.cc
@@ -44,7 +44,8 @@
#include <generic/apt/apt.h>
#include <generic/apt/config_signal.h>
-#include <generic/apt/matchers.h>
+#include <generic/apt/matching/parse.h>
+#include <generic/apt/matching/match.h>
#include <apt-pkg/error.h>
#include <apt-pkg/pkgrecords.h>
@@ -65,7 +66,8 @@ namespace cwidget
using namespace widgets;
}
-namespace match = aptitude::matching;
+namespace matching = aptitude::matching;
+using cw::util::ref_ptr;
class pkg_handling_label:public cw::label
{
@@ -193,10 +195,10 @@ public:
return;
}
- std::vector<match::pkg_matcher *> search_leaves;
+ std::vector<ref_ptr<matching::pattern> > search_leaves;
// Search for package (versions) that are not automatically
// installed and that are or will be installed.
- search_leaves.push_back(match::parse_pattern("?not(?automatic)?any-version(?or(?version(CANDIDATE)?action(install), ?version(CURRENT)?installed))"));
+ search_leaves.push_back(matching::parse("?not(?automatic)?any-version(?or(?version(CANDIDATE)?action(install), ?version(CURRENT)?installed))"));
try
{
bool success = false;
@@ -208,14 +210,8 @@ public:
}
catch(...)
{
- for(std::vector<match::pkg_matcher *>::const_iterator it
- = search_leaves.begin(); it != search_leaves.end(); ++it)
- delete *it;
+ ; // Eat and hide errors.
}
-
- for(std::vector<match::pkg_matcher *>::const_iterator it
- = search_leaves.begin(); it != search_leaves.end(); ++it)
- delete *it;
}
void set_no_package()