[pacman-dev] [PATCH 2/7] libmakepkg: stop printsrcinfo generating empty values

Morgan Adamiec morganamilo at gmail.com
Fri Jun 8 20:37:37 UTC 2018


> Please don't change this to paper over bad PKGBUILDs.

the thing is foo= is never declared in the pkgbuild

A pkgbuild like this:

pkgname=foo
pkgver=1
pkgrel=1
arch=('any')

package() {
depends+=("bar")
}

Generates a srcinfo like this:

pkgbase = foo
pkgver = 1
pkgrel = 1
arch = any

pkgname = foo
depends =
depends = bar

When you perform foo+=(bar) when foo is unset the array will only
contain foo. So no I wouldn't put the blame on bad pkgbuilds here.

Infact the same thing happens if you do declare depends globally like such:

pkgname=foo
pkgver=1
pkgrel=1
arch=('any')
depends=()

package() {
depends+=("bar")
}


More information about the pacman-dev mailing list