From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.19 i686; en-US; rv:0.9.1) Gecko/20010608 Description of problem: If i try to uninstall squid package, and squid is not running, it fails, complaining something about the %preun script. If squid runs while uninstalling it, then there's no such problem. How reproducible: Always Steps to Reproduce: 1.Install squid (but do not run it) 2.Uninstall it 3.BOOM! :-P Actual Results: RPM fails, complaining about %preun script Expected Results: Squid should uninstall cleanly, no matter if it's running or not. Additional info: I already saw this bug for sysklogd. Maybe some other daemons suffer from the same problem. You should check all daemons from the distribution.
Interesting. Same symptons as bug #50123, but that one refers to sysklogd. $ rpm -q --qf "%{preun}\n" squid if [ $1 = 0 ] ; then rm -f /var/log/squid/* /sbin/chkconfig --del squid service squid stop >/dev/null 2>&1 fi Better: if [ $1 = 0 ] ; then rm -f /var/log/squid/* /sbin/chkconfig --del squid [ -f /var/lock/subsys/squid ] && service squid stop >/dev/null 2>&1 fi
Ah, just noticed: same reporter. Hi! :-)
And of course move the "/sbin/chkconfig --del squid" at the end.....
fixed in -5. Thanks!