[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#782559: apt-get complains about unknown options when it's the command that's wrong



Control: tags -1 - patch
Control: tags -1 + newcomer

On Sun, Jul 19, 2015 at 08:16:47AM +1000, Carlos Maddela wrote:
> This one has annoyed me a few too many times, so I've had a go at a patch.

Thanks for the patch, but it is unfortunately incomplete as with the
patch applied on a recent git checkout produces the same:

$ LANG=C.UTF-8 apt-get --purge autoremvoe
E: Command line option --purge is not understood

You might have tested this patch with other options like
--install-recommends, for which it 'works'. The problem is that we
started to move the apt-tools to accept only options in commands in
which they are actually supported as the previous behaviour of accepting
all options for all commands was confusing and could actually be
dangerous if you relied on a certain option doing something, but the
option was never implemented in this command…

Some options aren't categorized yet, like --install-recommends, which
still claims to be supported on all commands, like on clean:
apt-get clean --install-recommends -s

Also, it would be good if a patch supported the other apt tools and not
just works with apt-get. Especially 'apt' comes to mind.


So, its probably better to change getCommandArgs to do something clever
on a Cmd == NULL as the FIXME in the code suggests, its just that this
needs to keep support for stuff like "apt-get -h", which is why there is
a FIXME and not an error message in its place already.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: Digital signature


Reply to: