[Aptitude-devel] Bug#956390: aptitude -o complains about empty value

David Kalnischkies david at kalnischkies.de
Fri Apr 10 17:06:24 BST 2020


Hi,

On Fri, Apr 10, 2020 at 04:54:26PM +0200, Matus UHLAR - fantomas wrote:
> when I want to clear a config value, aptitude complains about syntax:

(beware, not an aptitude dev – "just" an apt dev)

> # aptitude -o Acquire::http::Proxy= install
> -o requires an argument of the form key=value, got Acquire::http::Proxy=
> 
> this can be worked around with quoting empty quotes, e.g.:
> 
> # aptitude -o 'Acquire::http::Proxy=""' install

This doesn't have the effect you think it has for two reasons:

a) To disable a proxy setting use the value DIRECT as e.g. the manpage
apt-transport-http tell you as empty values are the same as unset values
causing the default value (which might be non-empty) to be used.

b) Your workaround is not setting an empty value. It is setting the
option to value "" (yes, two double-quotes). You can verify this with
apt-config dump if you want, but I am hereby refusing to take
responsibility for any damage this might cause to your sanity if you
embark on the journey of wanting to understand why. It is much safer to
accept that it is this way for (unspecified, mostly backward-compat) reasons.


That said, it might make sense to be able to set an empty value from the
cmdline, yes, but apt doesn't have a way for it either and because of a)
that might be for the best. I think we have a bugreport about that on
the apt side of things and I am not sure what to do there, so I will
happily leave this one here for the fine aptitude folks.


/me goes back to suckle on his thumb after having stared too long into
the abyss that is apt's configuration syntax.


A happy upcoming easter (if it applies to you),
a good continued self-isolation (same ^) &
Best regards

David Kalnischkies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/aptitude-devel/attachments/20200410/c60e1713/attachment.sig>


More information about the Aptitude-devel mailing list