Bug 50411 - squid package fails to uninstall
Summary: squid package fails to uninstall
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: squid
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-31 00:18 UTC by Florin Andrei
Modified: 2014-03-17 02:22 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-07-31 01:26:17 UTC
Embargoed:


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.