summaryrefslogtreecommitdiff
path: root/sys-boot/grub/grub-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/grub/grub-9999.ebuild')
-rw-r--r--sys-boot/grub/grub-9999.ebuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 5aff4addbbee..407e54b6f361 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -297,18 +297,28 @@ pkg_postinst() {
elog "For information on how to configure GRUB2 please refer to the guide:"
elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
- if has_version 'sys-boot/grub:0'; then
- elog "A migration guide for GRUB Legacy users is available:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test -gt ${v}; then
+ ewarn
+ ewarn "Re-run grub-install to update installed boot code!"
+ ewarn
+ break
+ fi
+ done
+ else
elog
optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober
optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn
optfeature "enabling RAID device detection" sys-fs/mdadm
fi
+ if has_version 'sys-boot/grub:0'; then
+ elog "A migration guide for GRUB Legacy users is available:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
+ fi
+
if has_version sys-boot/os-prober; then
ewarn "Due to security concerns, os-prober is disabled by default."
ewarn "Set GRUB_DISABLE_OS_PROBER=false in /etc/default/grub to enable it."