[grub2/f16] Don't do sysadminny things in %preun or %post ever. (#735259)
Peter Jones
pjones at fedoraproject.org
Fri Sep 2 15:59:58 UTC 2011
commit 5c9195d6908124f023f5a47bf1c3245f63940831
Author: Peter Jones <pjones at redhat.com>
Date: Fri Sep 2 10:57:30 2011 -0400
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.
grub2.spec | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/grub2.spec b/grub2.spec
index 4a03fa4..decdc9f 100644
--- a/grub2.spec
+++ b/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,-)
More information about the scm-commits
mailing list