Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
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!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
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#7085 - namcap has trouble with some PKGBUILDs
Attached to Project:
Arch Linux
Opened by Shira K (Shirakawasuna) - Monday, 07 May 2007, 05:38 GMT
Last edited by Jason Chu (jason) - Tuesday, 24 July 2007, 18:41 GMT
Opened by Shira K (Shirakawasuna) - Monday, 07 May 2007, 05:38 GMT
Last edited by Jason Chu (jason) - Tuesday, 24 July 2007, 18:41 GMT
|
DetailsAfter a bit of searching, it seems namcap has trouble analyzing PKGBUILDs that have md5sum entries that span multiple lines.
For example, if my PKGBUILD has these lines: md5sums=('afb4476b9556fff4d18db124b20141a9' 'e9d7c18677809eed61ca6f5225c33a9d' 'e19debe24be20f1f88e112bb1ac869a3' '8ba4628fa1cac3399725fff8a4a88157' '97a20a4122d0ff789b5a26a6c77fdde1') then namcap will give this error: $ namcap PKGBUILD Traceback (most recent call last): File "/usr/bin/namcap", line 163, in <module> ret = pkg.analyze(pkginfo, package) File "/usr/lib/python2.5/site-packages/Namcap/md5sums.py", line 34, in analyze if len(pkginfo.source) > len(pkginfo.md5sums): TypeError: object of type 'NoneType' has no len() As these lines were generated by makepkg -g PKGBUILD, it would be a good idea to improve this functionality. To work around this, simply reduce the md5sum entry to a single line, i.e. to make the earlier lines work they would look like this: md5sums=('afb4476b9556fff4d18db124b20141a9' 'e9d7c18677809eed61ca6f5225c33a9d' 'e19debe24be20f1f88e112bb1ac869a3' '8ba4628fa1cac3399725fff8a4a88157' '97a20a4122d0ff789b5a26a6c77fdde1') |
This task depends upon
Closed by Jason Chu (jason)
Tuesday, 24 July 2007, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: This has been fixed in an even better way in namcap 2.0.
Tuesday, 24 July 2007, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: This has been fixed in an even better way in namcap 2.0.
I don't have issues with makepkg -g generated md5sums and namcap.
It likely has to do with the omission of the \ at the end of lines in the md5sums array. They are not required by bash and we got rid of them with pacman 3. We may need a new way to parse the PKGBUILD file for all of the arrays that could span multiple lines (in theory, all of them).
This patch should fix it.