Bug 179060 - rpm-python rpm.labelCompare() chooses different packages than rpm command
rpm-python rpm.labelCompare() chooses different packages than rpm command
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-26 16:44 EST by Laurie Reeves
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-26 17:17:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Laurie Reeves 2006-01-26 16:44:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051121 Fedora/1.0.7-1.1.fc4.userful.1 Firefox/1.0.7

Description of problem:
Here's the output from the rpm command (rpm -Uvh lame-*). 

warning: package lame = 0:3.96.1-0.lvn.1.4 was already added, replacing with lame <= 3.96.1-0.lvn.4.4
warning: package lame-devel = 0:3.96.1-0.lvn.1.4 was already added, replacing with lame-devel <= 3.96.1-0.lvn.4.4

My script produces this output:

Discarding lame (3.96.1-0.lvn.4.4 < 0:3.96.1-0.lvn.1.4)
Discarding lame-devel (3.96.1-0.lvn.4.4 < 0:3.96.1-0.lvn.1.4)


Version-Release number of selected component (if applicable):
rpm-4.3.2-21 rpm-python-4.3.2-21

How reproducible:
Always

Steps to Reproduce:
1. Upgrade multiple packages with the same name but different EVR
2. Note which packages are chosen
3. Use python's rpm.labelCompare() to compare packages
4. Again, note which packages are chosen

  

Actual Results:  different packages will be chosen depending on the quarky way the packager packaged the package

Expected Results:  the rpm command and the rpm-python rpm.labelCompare() function should give the same results.

Additional info:

I think the rpm command's behaviour is wrong in this case because the one without the epoch is chosen. The packager incorrectly dropped the epoch and didn't notice the error because the rpm command agreed with him.

I guess the rpm command is using the release part of the EVR. In this case it (incorrectly) gets the newest one.
Comment 1 Jeff Johnson 2006-01-26 17:17:02 EST
The easiest fix is to specify what packages you want installed, not relying on whatever
heuristic is in rpmlib to discard older packages that are included with a "*".

Fixed upstream.
Comment 2 Laurie Reeves 2006-01-26 18:03:00 EST
I'm trying to use a python script to determine which package to use. The only
think I have it to rely on rpmlib's heuristic. The problem is, rpm and
rpm-python are doing it differently.

Is this upsteam fix going to make it into FC4 updates?

Note You need to log in before you can comment on or make changes to this bug.