mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 14:32:58 +00:00
Don't do sysadminny things in %preun or %post ever. (#735259)
grub2-install and removing old installs are not the package's business, and they break package updates.
This commit is contained in:
parent
62686d201e
commit
5c9195d690
1 changed files with 0 additions and 10 deletions
10
grub2.spec
10
grub2.spec
|
@ -217,26 +217,16 @@ rm $RPM_BUILD_ROOT/usr/share/locale/*/LC_MESSAGES/grub.mo
|
|||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
# Determine the partition with /boot
|
||||
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
|
||||
# Generate core.img, but don't let it be installed in boot sector
|
||||
%{name}-install --grub-setup=/bin/true $BOOT_PARTITION
|
||||
if [ "$1" = 1 ]; then
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2-dev.info.gz || :
|
||||
fi
|
||||
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2-dev.info.gz || :
|
||||
fi
|
||||
# XXX Ugly
|
||||
rm -f /boot/%{name}/*.mod
|
||||
rm -f /boot/%{name}/*.img
|
||||
rm -f /boot/%{name}/*.lst
|
||||
rm -f /boot/%{name}/device.map
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
|
Loading…
Reference in a new issue