Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#23258 - [namcap] namcap dies when pkgbuild misses source or md5sum array

Attached to Project: Arch Linux
Opened by Jelle van der Waa (jelly) - Sunday, 13 March 2011, 14:00 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Sunday, 13 March 2011, 16:24 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



If the source=() or md5sums=() array is missing namcap aborts with a python traceback. This will happen with all the -cvs,git,svn packages.
Because these pkgbuilds pull from vcs it's not logical to add md5sums or source array, it would also be nicer to get an error message like: " source array is missing "

Version: namcap 3.0-1

Traceback (most recent call last):
File "/usr/lib/python3.2/", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python3.2/", line 73, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.2/site-packages/", line 276, in <module>
process_pkgbuild(package, active_modules)
File "/usr/lib/python3.2/site-packages/", line 182, in process_pkgbuild
ret = rule.analyze(pkginfo, package)
File "/usr/lib/python3.2/site-packages/Namcap/rules/", line 46, in analyze
if len(pkginfo["source"]) > len(pkginfo[sumname]):
File "/usr/lib/python3.2/site-packages/Namcap/", line 114, in __getitem__
return self._data[self.canonical_varname(key)]
KeyError: 'source'
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Sunday, 13 March 2011, 16:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 3.0.1
Comment by Jelle van der Waa (jelly) - Sunday, 13 March 2011, 14:26 GMT
here is the pkgbuild i used namcap one.
   PKGBUILD (1.6 KiB)
Comment by Jelle van der Waa (jelly) - Sunday, 13 March 2011, 14:28 GMT
btw just realised this isn't the faulty one, when you remove the source=() and md5sums=() array it fails.