On 4/12/20 5:01 PM, Daniel M. Capella wrote:
- split: Fix erroneous $pkgname calls to use $pkgbase
It's not automatically erroneous to use $pkgname in a split package, ${pkgname[0]} is commonly the same value as $pkgbase and there's no problem using either one. You might need to be more specific for package_*() alone... but those invocations actually use pkgbase.... If this is about making the current inconsistent use of both pkgbase and pkgname all over the file, then can the commit message mention this? At the moment it is certainly no *clearer* to the user which one they might want to use, and why one might recommend avoiding the use of $pkgname...
- VCS:
- Add missing fields
What is missing about them? These proto files don't need to be a complete command reference for makepkg variables, the authoritative documentation which people actually use is PKGBUILD(5). I'd even rather we remove the unused ones entirely to match how we expect users to write production PKGBUILDs. :p At least -vcs and -split probably don't need to repeat everything which PKGBUILD.proto has prototyped, they only really need to prototype how to adapt a git source or split packaging function.
- Remove unnecessary $srcdir's
This is a stylistic choice, and cd'ing to absolute paths rooted in $srcdir is useful if you do something like cd "${srcdir}"/foo do_something cd "${srcdir}"/bar do_something since cd ../bar can be difficult to follow the more times you do it. Personally, I always use $srcdir in my cd's.
- Move ./autogen.sh to prepare()
Running ./autogen.sh is actually one of my pet peeves, it is flatly incorrect. GNU autotools documentation considers this to be deprecated and you should use -- and ensure the build system uses -- autoreconf when- and where- ever possible (which is nearly always, unless configure.ac is missing some builtin macro, and that should be fixed). While I agree that autogen.sh should not be run in PKGBUILD-vcs.proto's build() function, I would change it to autoreconf -fi at the same time as moving it to prepare.
- 80 char line length for comments and make license note stand out
The current comments are already 80 lines, so I'm not sure what this means?
- Add ./autogen.sh to the other proto's
Continuing on from the previous point about autotools autogen/autoreconf usage... For dist tarballs uploaded to ftp sites, autoreconf will have already been run, there is no need to rerun it except for VCS packages, which is why PKGBUILD.proto and PKGBUILD-split.proto don't have it at all. I do not believe we should add this as it violates the expected use of autotools for stable release tarballs. -- Eli Schwartz Bug Wrangler and Trusted User