On Mon, Oct 03, 2005 at 12:10:24PM +0200, Tom Parker <[EMAIL PROTECTED]> was 
heard to say:
> Every time I startup the aptitude GUI (either from just from running
> 'aptitude' at the command line, or via any of the commands) I get the
> message "Exactly one filter must be provided as an argument to a filter 
> policy"
> 
> Dropping the following line from my ~/.aptitude/config
>       aptitude::UI::Default-Grouping 
> "filter(missing),task,status,section(subdir,passthrough),section(topdir)";
> fixes the problem. I've never touched that config file before today,
> so I'm guessing that was automatically added by an earlier version of
> aptitude?

  The attached patch should fix this problem.

  Daniel
Thu Oct  6 18:21:58 PDT 2005  Daniel Burrows <[EMAIL PROTECTED]>
  * Correctly strip the leading '(' at the start of a filter policy.
  Remember that the group policy parser core doesn't know whether policies
  take arguments or not, so it's up to the individual policies to require
  and remove this character if they want to.  (Closes: #331404)
diff -rN -u old-head/src/load_grouppolicy.cc new-head/src/load_grouppolicy.cc
--- old-head/src/load_grouppolicy.cc    2005-10-06 18:24:33.998695160 -0700
+++ new-head/src/load_grouppolicy.cc    2005-10-06 18:21:20.000000000 -0700
@@ -408,6 +408,11 @@
     static const string missing = "missing";
     bool is_missing = true;
 
+    if(begin != end && *begin != '(')
+      throw GroupParseException(_("Expected '(' after 'filter'"));
+
+    ++begin;
+
     string::const_iterator begin2 = begin;
     while(isspace(*begin2))
       ++begin2;

Attachment: signature.asc
Description: Digital signature

Reply via email to