[arch-projects] [PATCH] [namcap] Fix makedepends.py for PKGBUILD without source array

Michael Straube michael.straube at posteo.de
Mon Jan 20 09:57:59 UTC 2020


Namcap errors when a PKGBUILD has no source array. Test if the PKGBUILD
has a source array in the VCSMakedepends rule to avoid such errors.

Fixes FS#65042

Signed-off-by: Michael Straube <michael.straube at posteo.de>
---
 Namcap/rules/makedepends.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Namcap/rules/makedepends.py b/Namcap/rules/makedepends.py
index 53676c2..380a089 100644
--- a/Namcap/rules/makedepends.py
+++ b/Namcap/rules/makedepends.py
@@ -56,6 +56,9 @@ class VCSMakedepends(PkgbuildRule):
 		missing = []
 		protocols = set()
 
+		if 'source' not in pkginfo:
+			return
+
 		for s in pkginfo["source"]:
 			p = s.split("::", 1)[-1]
 			p = p.split("://", 1)[0]
-- 
2.25.0


More information about the arch-projects mailing list