mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
Remove triggers needed to upgrade from legacy GRUB
The legacy GRUB package (grub2 < 1.99-4) had a %preun scriptlet that did a rm -f /boot/%{name}/*.{mod,img,lst} and caused users who upgraded to grub2 to have an empty /boot/%{name} directory, leading to an unbootable system. To workaround this, a set of %triggerun and %triggerpostun triggers were added that backup and restore the /boot/%{name} directory. But that was an issue in Fedora 16, almost a decade ago. These aren't needed anymore. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
8efaf82828
commit
5e2444babe
1 changed files with 0 additions and 25 deletions
25
grub2.spec
25
grub2.spec
|
@ -310,31 +310,6 @@ elif [ -f /etc/grub.d/01_users ] && \
|
|||
fi
|
||||
fi
|
||||
|
||||
%triggerun -- grub2 < 1:1.99-4
|
||||
# grub2 < 1.99-4 removed a number of essential files in postun. To fix upgrades
|
||||
# from the affected grub2 packages, we first back up the files in triggerun and
|
||||
# later restore them in triggerpostun.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=735259
|
||||
|
||||
# Back up the files before uninstalling old grub2
|
||||
mkdir -p /boot/grub2.tmp &&
|
||||
mv -f /boot/grub2/*.mod \
|
||||
/boot/grub2/*.img \
|
||||
/boot/grub2/*.lst \
|
||||
/boot/grub2/device.map \
|
||||
/boot/grub2.tmp/ || :
|
||||
|
||||
%triggerpostun -- grub2 < 1:1.99-4
|
||||
# ... and restore the files.
|
||||
test ! -f /boot/grub2/device.map &&
|
||||
test -d /boot/grub2.tmp &&
|
||||
mv -f /boot/grub2.tmp/*.mod \
|
||||
/boot/grub2.tmp/*.img \
|
||||
/boot/grub2.tmp/*.lst \
|
||||
/boot/grub2.tmp/device.map \
|
||||
/boot/grub2/ &&
|
||||
rm -r /boot/grub2.tmp/ || :
|
||||
|
||||
%posttrans common
|
||||
set -eu
|
||||
|
||||
|
|
Loading…
Reference in a new issue