From ed94f69c91e77033457cc34c0b6e2ccc3ba7818b Mon Sep 17 00:00:00 2001 From: Sinny Kumari Date: Jun 04 2018 10:17:42 +0000 Subject: Don't perform ABI comparison when package doesn't ship devel/header Don't perform ABI comparison when there is no header/devel package shipped with package. We consider that if there is no header/devel package is shipped then package doesn't export any public ABI. This will help to get rid of some false positives ABI changes See https://pagure.io/task-abicheck/issue/8#comment-502435 Signed-off-by: Sinny Kumari --- diff --git a/run_abipkgdiff.py b/run_abipkgdiff.py index cc7117b..d1a79cf 100755 --- a/run_abipkgdiff.py +++ b/run_abipkgdiff.py @@ -155,6 +155,17 @@ def test_arch(arch, stable_rpmsdir, update_rpmsdir, detail): header_pkgs_in_stable_rpms = get_header_packages(stable_rpms_detail) header_pkgs_in_update_rpms = get_header_packages(update_rpms_detail) + # Don't perform any ABI comparison when there is no header/devel package + # available. We consider that if there is no header/devel package is + # shipped then package doesn't export any public ABI + # See https://pagure.io/task-abicheck/issue/8 + if not header_pkgs_in_stable_rpms and not header_pkgs_in_update_rpms: + detail.output.append("No associated devel or header package found. " + "This means package doesn't export public ABI.\n\n") + detail.update_outcome("PASSED") + detail.note = 'no publicly exported ABI' + return + for update_rpm in update_rpms_detail: for stable_rpm in stable_rpms_detail: if (stable_rpm['name'] != update_rpm['name']) or \ @@ -170,7 +181,6 @@ def test_arch(arch, stable_rpmsdir, update_rpmsdir, detail): header_pkgs_in_stable_rpms, stable_rpm) header_pkg_in_update_rpms = get_right_header_package_for_rpm( header_pkgs_in_update_rpms, update_rpm) - if header_pkg_in_stable_rpms: command.extend(['--devel1', stable_rpmsdir + '/' + header_pkg_in_stable_rpms['rpm']])