On Thu, Jan 26, 2006 at 04:33:12PM +1300, Mark Robinson <[EMAIL PROTECTED]> was 
heard to say:
> this is still borken
> 
> piwakawaka:~# aptitude -qq update
> Expected a number after -q=, got q
> piwakawaka:~#
> 
> which is a lie, there was no -q=
> 
> Here's the relevant code from main.cc in aptitude-0.4.1:
> 
>         case 'q':
>           if(optarg == 0)
>             ++quiet;
>           else
>             {
>               if(*optarg == '=')
>                 ++optarg;
> 
>               if(*optarg == 0)
>                 {
>                   fprintf(stderr, _("Expected a number after -q=\n"));
>                   return -1;
>                 }
> 
>               char *tmp;
>               quiet = strtol(optarg, &tmp, 0);
> 
>               if(*tmp != '\0')
>                 {
>                   fprintf(stderr, _("Expected a number after -q=, got 
>                   %s\n"),
>                           optarg);
>                   return -1;
>                 }
>             }
>           seen_quiet = true;
>           break;
> 
> Obviously the block dealing with the parameters needs to be defined 
> contingent on the existance of the "=".

  Ew.

> The -q=n syntax is anomalous, every other option uses -x <value>. I suggest 
> that -q= be deprecated and that -qqq or -q n be encouraged instead.

  I think that would be great, and it's how things originally worked;
unfortunately, this led to user complaints (see earlier in this bug log).
And, predictably, it appears that adding a weird special case had unforseen
side effects (who woulda thunk it!)

> A side note: Attempting to compile aptitude throws up a linker error about 
> not being able to find cppunit. I assume this should be added as a 
> build-depends ?

  That should only happen when you run "make check" or do a package
build, and libcppunit-dev is a build-depends already AFAIK.  Which version
are you trying to build and how?

  Daniel

Attachment: signature.asc
Description: Digital signature

Reply via email to