Bug 621595

Summary: 'pkgrm RHATsmart' must be executed twice to remove package
Product: Red Hat Satellite 5 Reporter: Jiri Kastner <jkastner>
Component: SolarisAssignee: Clifford Perry <cperry>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-09 09:44:49 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: 462714    

Description Jiri Kastner 2010-08-05 15:16:45 UTC
Description of problem:
removing RHATsmart package from solaris by command 'pkgrm RHATsmart' must be executed twice

Version-Release number of selected component (if applicable):
RHATsmart-5.3.1-2.sparc64.pkg

How reproducible:
always with this package

Steps to Reproduce:
1. remove any RHAT package if any is present
2. remove /opt/redhat/rhn to have clean space after package removal
3. 'pkdadd -d RHATsmart-5.3.1-2.sparc64.pkg all'
4. 'pkgrm RHATsmart'
5. Removal of <RHATsmart> partially failed.
6. 'pkgrm RHATsmart'
7. Removal of <RHATsmart> was successful.
  
Actual results:
1st run of pkgrm ends with 'Removal of <RHATsmart> partially failed.'

Expected results:
1st run of pkgrm ends with 'Removal of <RHATsmart> was successful.'

Additional info:

Comment 1 Jiri Kastner 2010-08-05 15:52:14 UTC
caused by:
"pkgrm `pkginfo | grep RHAT | sort -r | cut -c13-27`"
.....
/opt/redhat/rhn/solaris <shared pathname not removed>
/opt/redhat/rhn <shared pathname not removed>
/opt/redhat <shared pathname not removed>
/opt <shared pathname not removed>
/etc/init.d/rhnsd
/etc/init.d <shared pathname not removed>
/etc <shared pathname not removed>
pkgrm: ERROR: unable to remove existing directory at </>
## Updating system information.

Removal of <RHATrhnc> partially failed.

There are 3 more packages to be removed.

Do you want to continue with package removal? [y,n,?,q] 
#############################################################
pkginfo | grep RHAT | sort -r | cut -c13-27 
RHATsmart      
RHATrpush      
RHATrhnl       
RHATrhncfgm    
RHATrhncfgc    
RHATrhncfga    
RHATrhncfg     
RHATrhnc       
RHATpythn      
RHATpossl      
RHATossl 
################################################################
"pkgrm `pkginfo | grep RHAT | cut -c13-27`" causes same problem with RHATsmart

#pkgrm `pkginfo | grep RHAT | cut -c13-27`
.....
/opt/redhat/rhn <non-empty directory not removed>
/opt/redhat <non-empty directory not removed>
/opt <shared pathname not removed>
pkgrm: ERROR: unable to remove existing directory at </>
## Updating system information.

Removal of <RHATsmart> partially failed.

#pkgrm `pkginfo | grep RHAT | cut -c13-27`

The following package is currently installed:
   RHATsmart  smartpm 5.3.1
              (sparce) 5.3.1,REV=

Do you want to remove this package? [y,n,?,q] y

## Removing installed package instance <RHATsmart>
(A previous attempt may have been unsuccessful.)
## Verifying package <RHATsmart> dependencies in global zone
## Processing package information.
## Removing pathnames in class <none>
## Updating system information.

Removal of <RHATsmart> was successful.