libabigail/tools
Chenxiong Qi 95b12167fa Fix package NVR comparison in fedabipkgdiff
When sorting two packages by their {Name Value Release} triplet to
select the latest one, just doing a string comparison of the NVRs is
wrong.  Take for example the packages foo-0.10-1.fc25 and
foo-0.2-1.fc25.  A basic string comparison will result in the string
"foo-0.10-1.fc25" being less than "foo-0.2-1.fc25", and thus
foo-0.2-1.fc25 will be selected as the latest package.  And that is
wrong, because the latest one is obviously foo-0.10-1.fc25.

So, after some research on this, I figured rpm.labelCompare is a
better choice to appropriately compare two NVRs.

Another reason why I chose rpm.labelCompare is because the latest
build in fedabipkgdiff means a build with the latest version.release
within a specific Fedora distribution such as fc23 or fc25.

	* configure.ac: Add new dependency.
	* tests/runtestfedabipkgdiff.py.in (builds): Add new builds for
	running tests to test selecting latest build from a package.
	(packages): Add new package gnutls.
	(GetPackageLatestBuildTest.{test_get_latest_one,
	test_cannot_find_a_latest_build_with_invalid_distro}): Use new
	builds of package gnutls to run tests.
	* tools/fedabipkgdiff (cmp_nvr): New function used to compare nvrs
	by Python built-in function sorted.
	(Brew.listBuilds): Use the new cmp_nvr function.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-06-11 09:10:10 +02:00
..
.gitignore Add .gitignore files. 2014-09-12 11:05:01 +02:00
abiar.cc Adjust archive-related code for the recent addition of tools_utils::* 2015-01-13 11:02:10 +01:00
abicompat.cc Implement a [suppress_file] suppression directive 2016-05-08 12:39:26 +02:00
abidiff.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
abidw.cc Add --verbose to abidw 2016-02-25 16:49:38 +01:00
abilint.cc Emit more informational messages on unrecognized options 2016-02-12 12:37:04 +01:00
abipkgdiff.cc Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
abisym.cc Implement string interning for Libabigail 2016-02-24 15:13:20 +01:00
binilint.cc Update copyright years 2015-01-07 17:52:10 +01:00
fedabipkgdiff Fix package NVR comparison in fedabipkgdiff 2016-06-11 09:10:10 +02:00
Makefile.am Bug 19428 - New fedabipkgdiff utility 2016-05-13 00:42:36 +02:00