From 5c9195d6908124f023f5a47bf1c3245f63940831 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 2 Sep 2011 10:57:30 -0400 Subject: [PATCH] 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 file changed, 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,-)