+++ 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:
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