Bug 673621

Summary: wrong %preun scriplet
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Suchý <msuchy>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: jmolet
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:39:20 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:
Bug Depends On:    
Bug Blocks: 568421    

Description Miroslav Suchý 2011-01-28 23:08:04 UTC
In spec file is:
%preun
if [ $1 = 0 ] ; then

'=' compares strings

there should be:
%preun
if [ $1 -eq 0 ] ; then

Comment 2 Bryan Kearney 2011-01-31 15:01:09 UTC
fixed in 8bc643b58db8e1b329fea358384dc61b2fd4fe7f

Comment 5 J.C. Molet 2011-02-21 13:59:29 UTC
[jmolet@jmolet subscription-manager]$ git branch 
* RHEL6
  master
[jmolet@jmolet subscription-manager]$ grep "%preun" -A 1 subscription-manager.spec 
%preun
if [ $1 -eq 0 ] ; then



[jmolet@jmolet subscription-manager]$ git checkout master
Switched to branch 'master'
[jmolet@jmolet subscription-manager]$ grep "%preun" -A 1 subscription-manager.spec 
%preun
if [ $1 -eq 0 ] ; then


^^ this has been verified against master and rhel6 branches

Comment 6 Miroslav Suchý 2011-02-21 15:13:54 UTC
?!
I'm not sure this is how it should be tested. I would expect compartment of output:
rpm --scripts  subscription-manager.rpm
The fact that something is in git, does not mean that it will be presented in final package....

Comment 7 J.C. Molet 2011-02-21 15:53:51 UTC
My apologies, I failed to recognize that. Running your verification seems to show that this persists:

[root@jmolet-vm0 ~]# rpm -q --scripts subscription-manager
postinstall scriptlet (using /bin/sh):
chkconfig --add rhsmcertd
# /sbin/service rhsmcertd start
preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ] ; then
   /sbin/service rhsmcertd stop >/dev/null 2>&1
   /sbin/chkconfig --del rhsmcertd
fi


[root@jmolet-vm0 ~]# rhsm-version 
subscription-manager-0.95.1-1.git.15.c75e560.el6.x86_64


Do you need further verification?

Comment 8 errata-xmlrpc 2011-05-19 13:39:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html