[pacman-dev] [PATCH] libmakepkg: lint all arrays for empty values
Morgan Adamiec
morganamilo at archlinux.org
Wed Oct 28 00:25:44 UTC 2020
On 28/10/2020 00:04, Allan McRae wrote:
> pkgnames/depends/etc where it may be an issue. So I'm not sure this
> check finds anything in the "break makepkg/pacman" category.
I disagree, it actually does break something, the srcinfio file
Consider the following pkgbuild:
pkgbase=foo
pkgname=(a b)
pkgver=1
pkgrel=1
arch=(any)
license=(1)
package_a() {
license=()
}
package_b() {
license=('')
}
And the srcinfo file:
pkgbase = foo
pkgver = 1
pkgrel = 1
arch = any
license = 1
pkgname = a
license =
pkgname = b
license =
Now package `a` overrides license to an empty array. The srcinfo
expresses this by putting an empty license entry.
Now package b defines a license of `empty string`, yet it generates the
same output. So it's impossible to tell what the original pkgbuild
actually meant.
This example may seen a little contrived, but i assure you it's not.
Because stuff like this is done in the wild [1] and as a maintainer of a
srcinfo parser it's annoying that it creates this ambiguity.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20201028/1c0eeb6a/attachment.sig>
More information about the pacman-dev
mailing list