pacman/scripts/libmakepkg/lint_pkgbuild
Eli Schwartz 316b031b7c makepkg: reduce strictness of pkgver in depends linting
This change was introduced to prevent entries like depends=('foo>').
However, it had the unintended side effect of causing a number of
working PKGBUILDs to fail to build. This happened when a PKGBUILD
defined one variable through calling a "complex" statement within the
PKGBUILD's package function (e.g. a function or evaluating in a
subshell), then used it to define the package metadata variable.

extract_function_variable() cannot execute the package function in order
to retrieve this information, so it performs a simple grep + eval instead
and in the process misses the contextual awareness of running within the
package function.

While not catching these "issues" can result in incorrect SRCINFO, the
resulting packages are fine. Stop aborting on the common case where the
pkgver of a dependency is dynamically set during the package function
until the large number of broken PKGBUILDs are fixed, and the
restrictions of the PKGBUILD format are documented.

"Fixes" FS#58776

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-07-27 10:21:58 +10:00
..
arch.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
backup.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
changelog.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
checkdepends.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
conflicts.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
depends.sh.in makepkg: reduce strictness of pkgver in depends linting 2018-07-27 10:21:58 +10:00
epoch.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
install.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
makedepends.sh.in libmakepkg: only save the shellopts we need 2018-05-12 21:11:52 +10:00
optdepends.sh.in libmakepkg/lint_pkgbuild: permit versioned optdepends 2018-06-18 13:15:51 +10:00
options.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
package_function.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
pkgbase.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
pkglist.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
pkgname.sh.in libmakepkg/lint_pkgbuild: squelch syntax error when a pkgname is empty 2018-06-18 13:15:51 +10:00
pkgrel.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
pkgver.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
provides.sh.in libmakepkg/lint_pkgbuild: fix regression in linting depends=(foo=$epoch:$pkgver-$pkgrel) 2018-05-12 21:10:44 +10:00
source.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
util.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
variable.sh.in Add missing sha224 sums in man page and linting 2018-06-18 13:15:51 +10:00