[arch-projects] [namcap] possibility to use renamed PKGBUILD files

ashark at linuxcomp.ru ashark at linuxcomp.ru
Wed Jan 24 21:50:40 UTC 2018


I have removed html formatting from my letter, but for some reason yandex still used html. Sorry for that.
Here is what I was saying:

Now you cannot randomly rename PKGBUILD files and use them with namcap.

I have filed a bug here: https://bugs.archlinux.org/task/57193
I created a patch for my needs:

diff --git a/namcap.py b/namcap.py
index b62a2fa..aae20c7 100755
--- a/namcap.py
+++ b/namcap.py
@@ -248,7 +248,7 @@ for package in packages:

         if os.path.isfile(package) and tarfile.is_tarfile(package):
                 process_realpackage(package, active_modules)
- elif package.endswith('PKGBUILD'):
+ elif package.startswith('PKGBUILD'):
                 process_pkgbuild(package, active_modules)
         else:
                 print("Error: Cannot process %s" % package)

But I think it is better to just assume than all non-tar files are pkgbuilds and should be processed accordingly.


More information about the arch-projects mailing list