Bug 1129865 - rpmdev_vercmp vs. yum: underscore in version
Summary: rpmdev_vercmp vs. yum: underscore in version
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-13 19:49 UTC by Jerry James
Modified: 2014-08-14 08:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-14 08:36:55 UTC


Attachments (Terms of Use)

Description Jerry James 2014-08-13 19:49:42 UTC
Description of problem:
As seen in the 20140813 Rawhide update:

$ rpm -q iwl5000-firmware
iwl5000-firmware-8.83.5.1_1-38.fc21.1.noarch
$ rpmdev-vercmp iwl5000-firmware-8.83.5.1_1-38.fc21.1 iwl5000-firmware-8.83.5.1-39.fc22.1
iwl5000-firmware-8.83.5.1_1-38.fc21.1 < iwl5000-firmware-8.83.5.1-39.fc22.1

So that's an upgrade, right?  But yum distro-sync disagrees:
...
Downgrading:
 iwl5000-firmware                                 noarch        8.83.5.1-39.fc22.1                        rawhide         293 k
...

Version-Release number of selected component (if applicable):
rpmdevtools-8.4-3.fc21.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run the query shown above
2. Observe that rpmdev-vercmp considers it an upgrade
3. Observe that yum considers it a downgrade

Actual results:
yum and rpmdev-vercmp disagree.

Expected results:
yum and rpmdev-vercmp agree.

Additional info:

Comment 1 Ville Skyttä 2014-08-14 08:36:55 UTC
I don't think there's anything to do about this. When rpmdev-vercmp is splitting the string "iwl5000-firmware-8.83.5.1_1-38.fc21.1" to name, version and release they become:

Name: iwl5000
Version: firmware
Release: 8.83.5.1_1-38.fc21.1

...which is correct but obviously (to a human) not what was intended and probably explains the rest of the results. yum has more precise info to work with, it doesn't have to parse the single string above into name, version and release but gets them separetely pre-parsed. rpmdev-vercmp has a mode where you can input name/version/release separately as well, I suppose that'd make it work like yum as that way it has the same info available.


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