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

Bug#578267: Missing option to skip default configuration



David Kalnischkies <kalnischkies+debian@gmail.com> writes:

> Hi Goswin von Brederlow,
>
> 2010/4/18 Goswin von Brederlow <goswin-v-b@web.de>:
>> There is also the matter of new options beeing added to apt that
>> existing scripts don't know about and therefore won't
>> override. Specifically APT::Architectures:: being set in the default
>> configuration file causes existing scripts to break.
> ( i hope the breakage in MultiArch-enabled environment is relatively low)

Better not build D-I in a MultiArch-enabled chroot for example.

>> And even if the script knows about it the setting can not be overriden.
> The config (sub)trees can be removed with the clear command in
> a configuration file, so e.g.
> #clear APT::Update::Pre-Invoke;
> will get right of all specified options in this tree.

#clear APT; clears the APT subtree.
#clear ; does nothing.

Shouldn't the later clear the whole tree?

>> --no-default-config
>>       Do not read the default configuration file from /etc/apt/.
> ( I assume you mean "files" here and therefore not only the "main"
>  apt.conf but also all files in apt.conf.d. )
> What can be achieved also by setting a config file with APT_CONFIG
> environment variable and in that file the paths for the configuration files.

That might be worth adding to "man apt-get". If it indeed works to
replace the default conffile then that is enough.

> I am tempted to say that this is enough as a script should really have
> a good reason to ignore all configuration files as most settings in these
> files are from the user itself so he will expect that they have an effect.
>
> The script should better override/disable the options he can't cope with
> (but even for this case he should have a strong reason instead of "simply"
>  supporting them) explicitly which he can do with -c his own setting file and
> #clear what::ever::option;
> (and maybe a --clear-option should be added to the command line
> to avoid the need of a setting file)
>
> Do you agree?

I don't agree there. In scripts apt-get is supposed to work a certain
way. You can't have some random user setting alter the way the script
works. E.g. when you build a debian-installer for i386 you do not to
suddenly get amd64 packages mixed in because the user enabled multiarch
in the system wide config. Or have it send a mail to the admin
mailinglist about new packages being installed while it only fetches
them for the D-I build.

The only way to get a consistent behaviour for a script is to ignore the
global config.

> Best regards / Mit freundlichen Grüßen,
>
> David Kalnischkies

I agree though that the bug can be closed if APT_CONFIG is documented
more publicly. E.g. add a reference to it in the -c option. If there is
already a way to not use the default conffile then we don't need another
way.

MfG
        Goswin




Reply to: