[arch-projects] [namcap] possibility to use renamed PKGBUILD files
Eli Schwartz
eschwartz at archlinux.org
Wed Jan 24 20:22:08 UTC 2018
> <div>Now you cannot randomly rename PKGBUILD files and use them with namcap.</div><div>Â </div><div>I have filed a bug here: https://bugs.archlinux.org/task/57193</div><div>I created a patch for my needs:</div><div>Â </div><div>diff --git a/namcap.py b/namcap.py</div><div>index b62a2fa..aae20c7 100755</div><div>--- a/namcap.py</div><div>+++ b/namcap.py</div><div>@@ -248,7 +248,7 @@ for package in packages:</div><div>Â </div><div>Â Â Â Â Â Â Â Â Â if os.path.isfile(package) and tarfile.is_tarfile(package):</div><div>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â process_realpackage(package, active_modules)</div><div>- elif package.endswith('PKGBUILD'):</div><div>+ elif package.startswith('PKGBUILD'):</div><div>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â process_pkgbuild(package, active_modules)</div><div>Â Â Â Â Â Â Â Â Â else:</div><div>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â print("Error: Cannot process %s" % package)</div><div>Â </div><div>But I think it is better to just assume than all non-tar files are pkgbuilds and should be processed accordingly.</div>
What?
--
Eli Schwartz
Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-projects/attachments/20180124/6623c197/attachment.asc>
More information about the arch-projects
mailing list