Bug 179060 - rpm-python rpm.labelCompare() chooses different packages than rpm command
Summary: rpm-python rpm.labelCompare() chooses different packages than rpm command
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2006-01-26 21:44 UTC by Laurie Reeves
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2006-01-26 22:17:02 UTC

Attachments (Terms of Use)

Description Laurie Reeves 2006-01-26 21:44:49 UTC
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:

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 22:17:02 UTC
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 23:03:00 UTC
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.