Re: [arch-projects] [PATCH] [namcap] Treat all non-tar files as PKGBUILD files, regardless of filename

2018-01-25 Thread Luke Shumaker
On Thu, 25 Jan 2018 13:50:19 -0500, Dave Reisner wrote: > On Thu, Jan 25, 2018 at 01:31:45PM -0500, Luke Shumaker wrote: > > From: Luke Shumaker > > > > https://bugs.archlinux.org/task/57193 > > > > If the user mistakenly passes in some other (non-package, non-PKGBUILD) > > file, instead of refu

Re: [arch-projects] [PATCH] [namcap] Treat all non-tar files as PKGBUILD files, regardless of filename

2018-01-25 Thread Dave Reisner
On Thu, Jan 25, 2018 at 01:31:45PM -0500, Luke Shumaker wrote: > From: Luke Shumaker > > https://bugs.archlinux.org/task/57193 > > If the user mistakenly passes in some other (non-package, non-PKGBUILD) > file, instead of refusing to process it (saying > "Error: Cannot process ${filename}"), it

[arch-projects] [PATCH] [namcap] Treat all non-tar files as PKGBUILD files, regardless of filename

2018-01-25 Thread Luke Shumaker
From: Luke Shumaker https://bugs.archlinux.org/task/57193 If the user mistakenly passes in some other (non-package, non-PKGBUILD) file, instead of refusing to process it (saying "Error: Cannot process ${filename}"), it will now try to parse it as a PKGBUILD, probably encounter and print at least

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 dir