[pacman-dev] [PATCH v2] makepkg: make per-package files containing '$pkgname' consistently work

Allan McRae allan at archlinux.org
Sun Jan 19 02:17:04 UTC 2020


On 17/1/20 3:27 am, Eli Schwartz wrote:
> Extracting function variables containing arbitrarily scoped variables of
> arbitrary nature is a disaster, but let's at least cover the common case
> of using the actual '$pkgname' in an install/changelog file. It's the
> odd case of actually being basically justified use of disambiguating
> between the same variable used in multiple different split packages...
> and also, --printsrcinfo already uses and overwrites the variable
> 'pkgname' in pkgbuild_extract_to_srcinfo, so this "works" in .SRCINFO
> but doesn't work in .src.tar.gz
> 
> It doesn't work in lint_pkgbuild either, but in that case the problem is
> being too permissive, not too restrictive -- we might end up checking
> the same file twice, and printing that it is missing twice.
> 
> Fixes FS#64932
> 
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---
> 
> v2: add explanatory comments, and handle lint_pkgbuild as well
> 

Great - patch looks good.

Allan


More information about the pacman-dev mailing list