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

2018-01-25 Thread ashark
> But if we want to get fancy, we could: > > 1) add a dependency on python-magic and check for text/plain > 2) read the file line by line to see if ^pkgname= exists anywhere. Seems like a good idea. And maybe still process as PKGBUILD when file is named just "PKGBUILD".

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

2018-01-25 Thread Eli Schwartz via arch-projects
On 01/25/2018 10:24 AM, Luke Shumaker wrote: >> But it would be better to just consider every non-archive file as a >> PKGBUILD file. > > +1 As I said on the bugreport: > Personally, I wonder why we bother checking the filename at all, > rather just assuming that the non-tar files are PKGBUILDs

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

2018-01-25 Thread Luke Shumaker
On Wed, 24 Jan 2018 17:17:52 -0500, ash...@linuxcomp.ru wrote: > > > 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

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

2018-01-24 Thread ashark
> 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"

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

2018-01-24 Thread Eli Schwartz via arch-projects
> 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 @@

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

2018-01-24 Thread Alad Wenter via arch-projects
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

2018-01-24 Thread ashark
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