Bug 171229

Summary: %postun error(s)
Product: Red Hat Enterprise Linux 4 Reporter: Rex Dieter <rdieter>
Component: docbook-dtdsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0-29 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-21 15:54:00 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 Rex Dieter 2005-10-19 18:36:02 UTC
$ rpm -e docbook-dtds openjade
Failed to remove entry from /etc/sgml/catalog
/var/tmp/rpm-tmp.15271: line 59: [: : integer expression expected

It appears the section of %%postun is in the if:

CATALOG=/etc/sgml/catalog
SGML=$(cat -n ${CATALOG} | grep sgml-docbook | head -1 | (read n line;echo $n))
XML=$(cat -n ${CATALOG} | grep xml-docbook | head -1 | (read n line; echo $n))
# Do they need switching around?
if [ "${XML}" -lt "${SGML}" ]

In that sometimes either SGML or XML end up being empty/blank when it probably
ought to be considerred to be 0.

Comment 1 Tim Waugh 2005-10-21 15:54:00 UTC
Thanks.  Fixed in 1.0-29.  Actually they shouldn't be taken to be zero; just the
test should not be made if either is nul.