diff options
author | Daniel Burrows <dburrows@debian.org> | 2008-10-06 20:53:59 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2008-10-06 20:53:59 -0700 |
commit | caa9693207e362cddb08085d987ce85982e381d5 (patch) | |
tree | dc79c62e52eda28795b8c756ac732187bd1dace9 /src/main.cc | |
parent | 5cfb2cd308b677f1cca32285e5f3fa922450fcc5 (diff) | |
download | aptitude-caa9693207e362cddb08085d987ce85982e381d5.tar.gz |
Switch everything over to the new search code.
This loses a little functionality in some places. Searches that go
item-by-item (e.g., curses "/") are broken for ?term matchers (and
hence also bare strings), and searches that return string groups
(e.g., "aptitude search" with a format pattern containing substring
IDs, or the "pattern" grouping policy) don't work. But other than
that, everything should work.
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main.cc b/src/main.cc index 54fa94e0..0e58e70a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,7 +34,9 @@ #include <generic/apt/apt.h> #include <generic/apt/config_signal.h> -#include <generic/apt/matchers.h> +#include <generic/apt/matching/match.h> +#include <generic/apt/matching/parse.h> +#include <generic/apt/matching/pattern.h> #include <generic/problemresolver/exceptions.h> @@ -532,17 +534,19 @@ int main(int argc, char *argv[]) { const std::string patternstr(arg, splitloc + 1); const std::vector<const char *> terminators; - aptitude::matching::pkg_matcher *m = - aptitude::matching::parse_pattern(patternstr, - terminators); + cwidget::util::ref_ptr<aptitude::matching::pattern> p = + aptitude::matching::parse(patternstr, + terminators, + true, + false); - if(m == NULL) + if(!p.valid()) { _error->DumpErrors(); return -1; } - user_tags.push_back(tag_application(is_add, optarg, m)); + user_tags.push_back(tag_application(is_add, optarg, p)); } } case OPTION_NOT_ARCH_ONLY: |