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

Eli Schwartz eschwartz at archlinux.org
Thu Jan 25 15:40:05 UTC 2018

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 and
> assuming the user is clever enough to understand the errors when no
> namcap rule passes.

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.

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/20180125/de007faf/attachment.asc>

More information about the arch-projects mailing list