Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#70671 - [pacman] Documentation - man 5 PKGBUILD - use of "pkgdir" variable
Attached to Project:
Arch Linux
Opened by James (thx1138) - Saturday, 01 May 2021, 18:01 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 01 May 2021, 19:08 GMT
Opened by James (thx1138) - Saturday, 01 May 2021, 18:01 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 01 May 2021, 19:08 GMT
|
Detailspacman 5.2.2-3
`man 5 PKGBUILD` states explicitly: "pkgdir ... This variable should only be used in the package() function." In fact, that is not what happens in practice. Either the documentation is wrong, or Arch developers routinely violate their own rules, which makes both documentation and rules rather useless. See, for instance, PKGBUILD for the linux kernel, which uses non-standard naming for the split package functions, `_package_foo()`, instead of `package_foo()`, and where then these functions create various package install directories, which were not created in the prepare() function. Either fix the PKGBUILD documentation, or fix nonconformant PKGBUILD files - or fix pacman so that people do not need to craft work-arounds, whatever the motivation was here. |
This task depends upon
Closed by Doug Newgard (Scimmia)
Saturday, 01 May 2021, 19:08 GMT
Reason for closing: Not a bug
Additional comments about closing: If you find any uses of $pkgdir outside of the package function(s) (actual uses), open a bug against those packages.
Saturday, 01 May 2021, 19:08 GMT
Reason for closing: Not a bug
Additional comments about closing: If you find any uses of $pkgdir outside of the package function(s) (actual uses), open a bug against those packages.
Regardless, whatever the pacman developers write in their man page is not indicative of what is accepted/unaccepted in terms of packaging guidelines for the distro as a whole. They are separate concerns.
FS#69869There is no such `package_*()` function defined in the linux package PKGBUILD.
> Also, this issue seems to be some weird semantics argument because of general unhappiness with
FS#69869Quite. We all enjoy deciphering other people's work when the documentation is misleading, right?
Whatever. The counter argument I am hearing is along the lines of "*I* already know how makepkg *really* works, so there is no reason to change the documentation."
Hey, let's all be 31ite H4ck0rs!
Every PKGBUILD must have a package() function, the linux package is no exception to this: since it is a split PKGBUILD, it has multiple package_$pkgname() functions, which are dynamically generated (cf. https://github.com/archlinux/svntogit-packages/blob/80030bba2d263553345ea30e9c31491e03985dd5/trunk/PKGBUILD#L192-L195), which I agree doesn't improve the readability of the PKGBUILD unfortunately. So this is really not about improving the pacman documentation since the PKGBUILD in question already follows the sentence that you quoted, but rather about the readability of the linux PKGBUILD, which is a totally separate issue.