FS#57193 - {namcap} possibility to use renamed PKGBUILD files

Attached to Project: Arch Linux
Opened by Andrew Shark (ashark) - Monday, 22 January 2018, 13:45 GMT
Last edited by Kyle Keen (keenerd) - Saturday, 07 July 2018, 02:28 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

There is no way to use namcap for checking PKGBUILD files that are named other than *PKGBUILD. I keep several PKGBUILD files in one directory, and they are named like "PKGBUILD-project1" "PKGBUILD-project2" "PKGBUILD-project3".
When I run
namcap PKGBUILD-project1
then I get
Error: Cannot process PKGBUILD-project1

But if I rename "PKGBUILD-project1" file to "something-PKGBUILD" and run
namcap something-PKGBUILD
then I get normal processing for that file.

So, for my need, I just could replase "package.endswith('PKGBUILD')" with "package.startswith('PKGBUILD')" (patch attached).
But I thought that it will be better if user could explicitly use any random name when he/she wants to proccess it as a PKGBUILD. So I suggest to create some option. For example, makepkg has -p <buildscript> option for that.
r

Additional info:
* package version 3.2.7
This task depends upon

Closed by  Kyle Keen (keenerd)
Saturday, 07 July 2018, 02:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  Commit 86482b447
Comment by Eli Schwartz (eschwartz) - Monday, 22 January 2018, 15:07 GMT
Consider sending this patch in to the development mailing list at https://lists.archlinux.org/listinfo/arch-projects

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.
Comment by Andrew Shark (ashark) - Wednesday, 24 January 2018, 20:05 GMT
I have sent a letter to mailing list that you mentioned.

Loading...