pacman/scripts/libmakepkg/lint_pkgbuild
Eli Schwartz 91b72cc386 libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname
depends, provides, conflicts, replaces, and other variables that are
meant to contain package names, are now checked to ensure

1) the name component contains only characters that would equate to
   a valid pkgname.
2) the version component contains only characters that would equate
   to a valid pkgver.
3) comparison operator is a valid comparison operator (e.g. provides
   only allows exact = while optdepends doesn't allow anything)

This also refactors pkgname into a shared utility function, wires up
pkgbase optdepends and provides to use it, and gives pkgver a touchup
to allow referencing where it was called from.

Fixes FS#57833 and a bit of extra.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-04-29 21:49:05 +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/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
conflicts.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
depends.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +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/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +10:00
optdepends.sh.in libmakepkg/lint_pkgbuild: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +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: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +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: lint depends/etc. as if they are pkgname 2018-04-29 21:49:05 +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 Update coyrights for 2018 2018-03-14 13:31:31 +10:00