MX Updater - replace conf file and automatic yes option in preferences

Message
Author
User avatar
bin
Posts: 68
Joined: Sun Aug 30, 2009 1:53 am

Re: MX Updater - replace conf file and automatic yes option in preferences

#11 Post by bin »

fehlix wrote: Tue Feb 07, 2023 9:06 am This question about configuration changes is on another level, not part of the general "yes" to proceed for apt.
IN theory we could try to force to keep-old with "N" (= keep) the existing conf files, but that may not always be what the user want's, hence we kept the question.
Thank you! That's the bit of information I needed.

https://raphaelhertzog.com/2010/09/21/d ... d-by-dpkg/ is very useful in explaining how this stuff works.
Avoiding the conffile prompt

Every time that dpkg must install a new conffile that you have modified (and a removed file is only a particular case of a modified file in dpkg’s eyes), it will stop the upgrade and wait your answer. This can be particularly annoying for major upgrades. That’s why you can give predefined answers to dpkg with the help of multiple --force-conf* options:

--force-confold: do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix. With this option alone, even configuration files that you have not modified are left untouched. You need to combine it with --force-confdef to let dpkg overwrite configuration files that you have not modified.
--force-confnew: always install the new version of the configuration file, the current version is kept in a file with the .dpkg-old suffix.
--force-confdef: ask dpkg to decide alone when it can and prompt otherwise. This is the default behavior of dpkg and this option is mainly useful in combination with --force-confold.
--force-confmiss: ask dpkg to install the configuration file if it’s currently missing (for example because you have removed the file by mistake).

If you use Apt, you can pass options to dpkg with a command-line like this:

$ apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

You can also make those options permanent by creating /etc/apt/apt.conf.d/local:

Dpkg::Options {
"--force-confdef";
"--force-confold";
}


In which case I hope that creating /etc/apt/apt.conf.d/local:

Code: Select all

Dpkg::Options {
"--force-confdef";
"--force-confold";
}
..will do the trick. Will test on grub and see what occurs.

User avatar
bin
Posts: 68
Joined: Sun Aug 30, 2009 1:53 am

Re: MX Updater - replace conf file and automatic yes option in preferences

#12 Post by bin »

The local file contains 2 lines - I have tried with just using confold on its own.
The messages in the install process for grub-pc vary slightly.
Using just confold it says ==> Using current old file as you requested.
Using both it says ==> Keeping old config file as default.
There's no difference between which other files are installed as part of the process.
My guess is that using both lines is the best way to go.

Post Reply

Return to “General”