[arch-projects] [namcap] [PATCH] silently skip over packages of type ${pkgbase}-debug

Eli Schwartz eschwartz at archlinux.org
Sun Apr 19 21:01:43 UTC 2020


These produce many false positives, for example ELF warnings for split
debug info. Under no circumstances do we want to claim there are any
errors here, since makepkg autogenerates the package and we presume it's
always right. Issues will always occur in the main package(s) only.

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 Namcap/package.py | 2 +-
 namcap.py         | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Namcap/package.py b/Namcap/package.py
index 2da5b1d..86129fe 100644
--- a/Namcap/package.py
+++ b/Namcap/package.py
@@ -209,7 +209,7 @@ def load_from_pkgbuild(path):
 	return ret
 
 def load_from_alpm(pmpkg):
-	variables = ['name', 'version', 'conflicts', 'url',
+	variables = ['base', 'name', 'version', 'conflicts', 'url',
 			'depends', 'desc', 'files', 'groups',
 			'has_scriptlet', 'size', 'licenses',
 			'optdepends', 'packager', 'provides', 'replaces']
diff --git a/namcap.py b/namcap.py
index a7f532a..dcf06f7 100755
--- a/namcap.py
+++ b/namcap.py
@@ -86,6 +86,10 @@ def process_realpackage(package, modules):
 		return 1
 
 	pkginfo = Namcap.package.load_from_tarball(package)
+
+	if pkginfo['name'] == pkginfo['base'] + '-debug':
+		# there are no errors -- this is a debug package autogenerated by makepkg
+		return 0
 	# Loop through each one, load them apply if possible
 	for i in modules:
 		rule = get_modules()[i]()
-- 
2.26.0


More information about the arch-projects mailing list