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

Bug#578267: Missing option to skip default configuration



2010/4/20 Goswin von Brederlow <goswin-v-b@web.de>:
> David Kalnischkies <kalnischkies+debian@gmail.com> writes:
>> 2010/4/18 Goswin von Brederlow <goswin-v-b@web.de>:
>>> 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?
A clear-all isn't implemented - and given that it would have been
the same result as the APT_CONFIG trick we don't need it - do we?


>>> --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.
It is described nowhere, but can be "extracted" from the apt.conf
manpage as in the DESCRIPTION section there is described in which
order the configuration files and options are parsed/evaluated.


> 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.
These systems already have a problem with preferences and sources.list -
or do they accept these as valid configuration while the complete config
is invalid? They are better of using their complete own apt setup (Dir::)
than fighting with disabling specific option, yes. I thought more of smaller
scripts/applications operating on the "normal" system which just can't
cope with $random option (yet).


> 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.
How about
>>>>>
-c, --config-file
Configuration File; Specify a configuration file to use.
The program will read the default configuration file and then this
configuration file. If configuration settings need to be set before the
default configuration files are parsed specify a file with the APT_CONFIG
environment variable. See apt.conf(5) for syntax information.
<<<<<
?


Best regards / Mit freundlichen Grüßen,

David Kalnischkies



Reply to: