Bug#851893: The availability of update-grub does not imply that GRUB is used
Le 19 janvier 2017 17:47:18 GMT+01:00, Alexander Kurtz <email@example.com> a écrit :
>People who want to have the GRUB binaries installed (for example to
>create VM images with GRUB), but don't want to use GRUB as their
>bootloader will (in the case of classic PCs) have the grub-pc-bin 
>and grub2-common  packages installed, but not the grub-pc 
>package as this contains the scripts for the automatic installation.
[buggy script code…]
>Since update-grub is shipped by the grub2-common package (see ),
>this test is wrong. The fact that update-grub is available does not
>imply that the system uses GRUB to boot. Since update-grub will
>obviously fail to run if GRUB is not installed to /boot, this bug
>causes desktop-base's postinst to fail, making the package
>uninstallable on such systems.
Thank you for your detailed bug report and analysis.
This looks a lot like #843727  to me, although not for the same use case.
Would you care to test 9.0.1, already in sid that should fix this problem ?
The following change was done :
208: update-grub || echo "Updating grub failed, report success anyway!"
I'll merge the 2 bugs after confirmation that it works for you.
If you know of a better and robust way to detect if grub is being used, advice is welcome.