Bug 251457

Summary: incorrect obsoletes detection
Product: Red Hat Enterprise Linux 4 Reporter: Alexander Sashnov <sashnov>
Component: up2dateAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED WONTFIX QA Contact: Ken Reilly <kreilly>
Severity: low Docs Contact:
Priority: low    
Version: 4.0   
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: 2012-06-20 15:53:56 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 Alexander Sashnov 2007-08-09 07:00:35 UTC
Description of problem:

up2date can't install rpm package set wich rpm can install correctly because it
have error in obsoletes detection.

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

on RedHat EL3: up2date-4.4.69-20
on RedHat EL4: up2date-4.4.69-25

How reproducible:

Try to install SWsoft Plesk software with hotfixes in one up2date call.

Steps to Reproduce:
1. configure up2date for access to RHN.

2. add sources for SWsoft Plesk 8.2 packages to /etc/sysconfig/rhn/sources:

yum product-distr-rpms
http://autoinstall.plesk.com/PSA_8.2.0/dist-rpm-RedHat-el3-i386
yum thirdparty-rpms
http://autoinstall.plesk.com/PSA_8.2.0/thirdparty-rpm-RedHat-el3-i386

3. Try to install psa with psa-updates packages:
  up2date-nox --dry-run --nosig psa psa-updates
  
Actual results:

up2date reports:
There was a package dependency problem.

Expected results:

Install psa and psa-updates with all dependencies.

Additional info:

psa-updates requires psa-hotfix3-8.2.0 package.
psa-8.2.0 is obsoletes 'psa-hotfix3 < 8.2.0'

psa-8.2.0 really is not obsoletes psa-hotfix3-8.2.0 but in up2date debug log I
can see:

[Wed Aug  8 16:50:36 2007] up2date Package ['psa-hotfix3', '8.2.0',
'rhel3.build82070807.17', '', 'i586', '1000', 'product-distr-rpms',
'base/psa-hotfix3-8.2
.0-rhel3.build82070807.17.i586.rpm'] is obsoleted by ['psa', '8.2.0',
'rhel3.build82070706.15', '', 'i586', 'psa-hotfix3', '8.2.0', 2]

I found this is because error in up2dateUtils.py:parseObsoleteVersion():

-    release = "0"
+    release = ""

Because this error up2dateUtils.py:isObsoleted() returns incorrect result.

>>> import rpm
>>> rpm.labelCompare(('0', '8.2.0', 'rhel3.build82070706.15'), ('0', '8.2.0', '') )
1
>>> rpm.labelCompare(('0', '8.2.0', 'rhel3.build82070706.15'), ('0', '8.2.0', '0') )
-1

Comment 2 Jiri Pallich 2012-06-20 15:53:56 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.