From ArchWiki
Jump to navigation Jump to search

Changes to the handling of PKGBUILD variables in split packages

The body of articles related to packaging guidelines and creating, maintaining, and reviewing packages includes very little about split packages, specifically how they differ from their non-split counterparts and what guidelines or conventions should be reflected in PKGBUILDs for split packages. There are some inconsistencies between what's documented on ArchWiki and what is implemented in pacman/makepkg. (I'll try to re-find the inconsistencies I've encountered.)

#pkgbase documents, "Everything, except #makedepends, #Sources, and #Integrity variables can be overridden within each split package's package() function", while the actual code of makepkg seems to allow overrides for a subset of those variables as defined in the following:

splitpkg_overrides=('pkgdesc' 'arch' 'url' 'license' 'groups' 'depends'
                    'optdepends' 'provides' 'conflicts' 'replaces' 'backup'
                    'options' 'install' 'changelog')

Specifically, #Version and #checkdepends variables are not part of that overrides' array but are not mentioned in #pkgbase. Is makepkg missing the ability to process overrides for these variables or is the documentation inaccurate in not listing these variables as not subject to overrides?

—This unsigned comment is by JamesAn (talk) 04:35, 7 May 2016‎. Please sign your posts with ~~~~!

From man PKGBUILD:
All options and directives for the split packages default to the global values given in
the PKGBUILD. Nevertheless, the following ones can be overridden within each split
package’s packaging function: pkgdesc, arch, url, license, groups, depends, optdepends,
provides, conflicts, replaces, backup, options, install, and changelog.
Just realised this post is two years old. Maybe the man page was not clear at the time.
It's certainly clear now though so I think it's safe to change it.
Morganamilo (talk) 21:09, 9 June 2018 (UTC)