Bug 78222

Summary: fatal trigger error upon erasing package
Product: [Retired] Red Hat Linux Reporter: Michael Schwendt <bugs.michael>
Component: portmapAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED CURRENTRELEASE QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: chris.ricker, jbj, miyel, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-13 05:51:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Schwendt 2002-11-20 10:56:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

The portmap package fails to uninstall.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rpm -evv portmap

Actual Results:  D: fini      100755  1 (   0,   0)      1901
D:     erase: %postun(portmap-4.0-46) asynchronous scriptlet start
D:     erase: %postun(portmap-4.0-46)   execv(/bin/sh) pid 3049
+ '[' 0 -ge 1 ']'
D:     erase: waitpid(3049) rc 3049 status 0
D:     erase: %postun(portmap-4.0-46) asynchronous scriptlet start
D:     erase: %trigger(portmap-4.0-46)  execv(/bin/sh) pid 3050
+ /sbin/chkconfig --add portmap
error reading information on service portmap: No such file or directory
D:     erase: waitpid(3050) rc 3050 status 100
error: %trigger(portmap-4.0-46) scriptlet failed, exit status 1

Expected Results:  No such error.

Despite the package version of 4.0-46, it activates its own postuninstall
trigger which of course no longer finds the "portmap" service script (afterall
this is postun) and hence fails.

%triggerpostun -- portmap <= portmap-4.0-22
/sbin/chkconfig --add portmap

Comment 1 Michael Schwendt 2002-11-20 12:21:52 UTC
[Cc'ing Jeff Johnson, because it looks like RPM is involved.]

On Valhalla the postuninstall trigger is not called upon erasing the package:

D:   NO     A portmap = 4.0-41  B portmap <= 4.0-22

Comment 2 Need Real Name 2002-11-21 01:26:32 UTC
These switches can be used to remove
portmap until the RPM is fixed

# rpm -e --notriggerpostun --nopreun portmap

Comment 3 Milan Kerslager 2002-11-24 11:56:21 UTC
Please change '=' to '-eq' inside trigger and preun script (at least). The test 
for numerical value should be like:

if [ $1 -eq 0 ]; then

The char '=' is intended to use for string comparing only.

The problem persist in beta1 (8.0.90).

Comment 4 Michael Schwendt 2004-03-13 05:51:15 UTC
Filed 2002-11-20, I cannot reproduce it with Fedora Core 1.