#950079 grub-cloud-amd64: not co-installable with grub-pc due to incompatible /etc/default/grub handling

Package:
grub-cloud-amd64
Source:
grub-cloud
Description:
GRand Unified Bootloader (cloud setup)
Submitter:
Andreas Beckmann
Date:
2021-04-13 05:15:03 UTC
Severity:
important
#950079#5
Date:
2020-01-28 20:25:28 UTC
From:
To:
Hi,

during a test with piuparts I noticed your package failed the piuparts
upgrade test because dpkg detected a conffile as being modified and then
prompted the user for an action. As there is no user input, this fails.
But this is not the real problem, the real problem is that this prompt
shows up in the first place, as there was nobody modifying this conffile
at all, the package has just been installed and upgraded...

This is a violation of policy 10.7.3, see
https://www.debian.org/doc/debian-policy/ch-files.html#behavior,
which says "[These scripts handling conffiles] must not ask unnecessary
questions (particularly during upgrades), and must otherwise be good
citizens."

https://wiki.debian.org/DpkgConffileHandling should help with figuring
out how to do this properly.

In https://lists.debian.org/debian-devel/2009/08/msg00675.html and
followups it has been agreed that these bugs are to be filed with
severity serious.

From the attached log (scroll to the bottom...):

  Setting up grub-pc (2.04-5) ...

  Creating config file /etc/default/grub with new version
  grub-probe: error: cannot find a device for / (is /dev mounted?).
  grub-probe: error: cannot find a device for /boot (is /dev mounted?).
  grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
[...]
  Setting up grub-cloud-amd64 (0.0.5) ...

  Configuration file '/etc/default/grub'
   ==> 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.
  *** grub (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package grub-cloud-amd64 (--configure):
   end of file on stdin at conffile prompt


This was observed during a test of the debian-cloud-images-packages package.


cheers,

Andreas

#950079#12
Date:
2020-02-18 07:45:30 UTC
From:
To:
Control: severity -1 important

This is actually ucf vs conffile in different packages.

But this is about conffiles, not scripts.

Bastian

#950079#19
Date:
2021-03-05 13:56:18 UTC
From:
To:
grub-pc: ucf
grub-cloud-amd64: conffile

Can we make grub-cloud-amd64 Conflicts: grub-pc ?
Then each can live in its own world handling /etc/default/grub
differently. (Are there more grub-cloud-$ARCH?)
Or is there some need for them to be co-installable?
(Switching from one to the other without purging the old one first will
likely cause more prompting, but such a switch is highly unlikely.)

This conflict will break debian-cloud-images-packages, which depends on
both grub-pc and grub-cloud-amd64. Is that really needed?

???
/etc/default/grub is a configuration file for both grub-pc and
grub-cloud-amd64, and for grub-pc it is also a conffile.

Andreas

#950079#24
Date:
2021-03-13 22:22:33 UTC
From:
To:
debian-cloud-images-packages has dropped the dependency on grub-pc in
the last upload, thanks.

Therefore I now vote for just adding to grub-cloud-amd64 a
   Conflicts: grub-pc

Andreas