Re: [arch-projects] [namcap] possibility to use renamed PKGBUILD files
> How is "startswith" any less arbitrary than "endswith"? Because of some > habit to move PKGBUILD to PKGBUILD.suffix? Yes, as I already told at https://bugs.archlinux.org/task/57193: I keep several PKGBUILD files in one directory, and they are named like "PKGBUILD-project1" "PKGBUILD-project2" "PKGBUILD-project3" It is personally my usage. Maybe somebody else names them differently, even maybe without "PKGBUILD" substring in file name. So, for my need, I just could replase "package.endswith('PKGBUILD')" with "package.startswith('PKGBUILD')". But it would be better to just consider every non-archive file as a PKGBUILD file.
Re: [arch-projects] [namcap] possibility to use renamed PKGBUILD files
> Now you cannot randomly rename PKGBUILD files and use them with > namcap. I have filed a bug here: > https://bugs.archlinux.org/task/57193I created a patch for my > needs: diff --git a/namcap.py > b/namcap.pyindex 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. What? -- Eli Schwartz Bug Wrangler and Trusted User signature.asc Description: OpenPGP digital signature
Re: [arch-projects] [namcap] possibility to use renamed PKGBUILD files
Whatever patch you were trying to post, it got lost in hoardes of div tags. Alad signature.asc Description: PGP signature
[arch-projects] [namcap] possibility to use renamed PKGBUILD files
Now you cannot randomly rename PKGBUILD files and use them with namcap. I have filed a bug here: https://bugs.archlinux.org/task/57193I created a patch for my needs: diff --git a/namcap.py b/namcap.pyindex 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.