• Re: Unexpected prompt during package update

    From Andy Smith@21:1/5 to John Boxall on Sat Nov 30 23:50:02 2024
    Hi,

    On Sat, Nov 30, 2024 at 05:38:40PM -0500, John Boxall wrote:
    apt-get -y --show-progress dist-upgrade

    During the dist-upgrade I am presented with the following prompt:

    <snip>
    Setting up fwupd (1.9.26-2) ...

    Configuration file '/etc/fwupd/fwupd.conf'
    File on system created by you or by a script.
    File also in package provided by package maintainer.
    What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
    D : show the differences between the versions
    Z : start a shell to examine the situation
    The default action is to keep your current version.
    *** fwupd.conf (Y/I/N/O/D/Z) [default=N] ? Y
    <snip>

    Is the option "-y" in the command not enough to prevent the prompt?

    This question is being asked by dpkg, not apt-get. I am unsure if there
    is an apt config option that forces confnew on dpkg, but it might be
    something like:

    $ sudo apt-get -o "Dpkg::Options::=--force-confnew" …

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Andy Smith on Sat Nov 30 23:50:02 2024
    On Sat, Nov 30, 2024 at 10:45:37PM +0000, Andy Smith wrote:
    Is the option "-y" in the command not enough to prevent the prompt?

    I forgot to add:

    Using -y on dist-upgrade is a good way to completely destroy your system
    given the slightest anomaly (and this is an upgrade to testing, so…) so
    I really wouldn't recommend it, but perhaps your VM is considered
    disposable…

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roberto =?iso-8859-1?Q?C=2E_S=E1nch@21:1/5 to John Boxall on Sun Dec 1 02:10:01 2024
    On Sat, Nov 30, 2024 at 05:38:40PM -0500, John Boxall wrote:

    Is the option "-y" in the command not enough to prevent the prompt?

    As Andy explained, no the "-y" option will not prevent the prompt.

    The "-y" as you have used it is passed to apt-get and defaults the
    answers to prompts presented by apt-get to "yes". However, the prompt
    you are seeing is actually from debconf (Andy said 'dpkg', which is
    partially correct).

    According to the debconf(7) manpage [0]:

    noninteractive
    This is the anti-frontend. It never interacts with you at all, and
    makes the default answers be used for all questions. It might mail
    error messages to root, but that's it; otherwise it is completely
    silent and unobtrusive, a perfect frontend for automatic installs.
    If you are using this front-end, and require non-default answers to
    questions, you will need to preseed the debconf database; see the
    section below on Unattended Package Installation for more details.

    So, it looks like what you want is noninteractive, with preseeding. You
    should probably read the entire man page, as there are lots of ways to
    tweak the behavior of debconf.

    Regards,

    -Roberto

    [0] https://manpages.debian.org/buster/debconf-doc/debconf.7.en.html

    --
    Roberto C. Sánchez

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)