Bug 1201375 - incorrect results from rpmdev-vercmp with some filenames
Summary: incorrect results from rpmdev-vercmp with some filenames
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-12 15:22 UTC by Pat Riehecky
Modified: 2015-03-12 16:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1201314
Environment:
Last Closed: 2015-03-12 16:03:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pat Riehecky 2015-03-12 15:22:57 UTC
+++ This bug was initially created as a clone of Bug #1201314 +++

Description of problem:
For certain filenames rpmdev-vercmp reports an incorrect result.

Version-Release number of selected component (if applicable):rpmdevtools-8.3-5.el7.noarch


How reproducible:100%


Steps to Reproduce:
1.rpmdev-vercmp asdf-1.2-4.el6 asdf-1.2.3-5.el6
2.
3.

Actual results:
asdf-1.2-4.el6 > asdf-1.2.3-5.el6

Expected results:
asdf-1.2-4.el6 < asdf-1.2.3-5.el6


Additional info:

Comment 1 Ville Skyttä 2015-03-12 16:03:16 UTC
That's an usage error, rpmdev-vercmp takes EVR strings as arguments, not NVR strings as in your example (so you should be calling "rpmdev-vercmp 1.2-4.el6 1.2.3-5.el6", leaving out the "asdf-" part). Since rpmdevtools 8.5 vercmp emits a warning about this:

$ rpmdev-vercmp asdf-1.2-4.el6 asdf-1.2.3-5.el6
WARNING: hyphen in release 1.2-4.el6

rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
rpmdev-vercmp <EVR1> <EVR2>
rpmdev-vercmp # with no arguments, prompt

Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2
is newer.  Other exit statuses indicate problems.

WARNING: hyphen in release 1.2.3-5.el6

rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
rpmdev-vercmp <EVR1> <EVR2>
rpmdev-vercmp # with no arguments, prompt

Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2
is newer.  Other exit statuses indicate problems.

asdf-1.2-4.el6 > asdf-1.2.3-5.el6


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