Bug 50411

Summary: squid package fails to uninstall
Product: [Retired] Red Hat Linux Reporter: Florin Andrei <florin>
Component: squidAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-31 01:26:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florin Andrei 2001-07-31 00:18:29 UTC
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.

Comment 1 Michael Schwendt 2001-07-31 00:48:34 UTC
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


Comment 2 Michael Schwendt 2001-07-31 00:49:40 UTC
Ah, just noticed: same reporter. Hi! :-)

Comment 3 Michael Schwendt 2001-07-31 01:26:13 UTC
And of course move the "/sbin/chkconfig --del squid" at the end.....

Comment 4 Bill Nottingham 2001-08-07 07:22:44 UTC
fixed in -5. Thanks!