From 2c94118dc168f16231e38a84c0b569b5b0006fd9 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 10 May 2018 23:23:58 -0400 Subject: libmakepkg/lint_pkgbuild: fix regression in linting depends=(foo=$epoch:$pkgver-$pkgrel) In commit 91b72cc386ca03241791748da5da2b150c724ace support was added for linting depends/etc. to ensure they contain only valid dependency specifiers. However it did not properly take into account the possibility of dependencies linked to a specific pkgrel or epoch, which promptly failed to build because "-" and ":" is not allowed in a pkgver. pkgrel is something supported by pacman and useful for e.g. split packages which cannot be mismatched even if the pkgver is the same. Fix by removing an optional suffixed "-$decimal" when checking for a valid pkgver. epoch is kind of difficult to do without :D so likewise fix by removing an optional prefixed "$integer:" Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in') diff --git a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in index d81e9784..8abad0b0 100644 --- a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in @@ -43,10 +43,12 @@ lint_conflicts() { for conflict in "${conflicts_list[@]}"; do name=${conflict%%@(<|>|=|>=|<=)*} - ver=${conflict#*@(<|>|=|>=|<=)} + # remove optional epoch in version specifier + ver=${conflict##$name@(<|>|=|>=|<=)?(+([0-9]):)} lint_one_pkgname conflicts "$name" || ret=1 if [[ $ver != $conflict ]]; then - check_pkgver "$ver" conflicts || ret=1 + # remove optional pkgrel in version specifier + check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" conflicts || ret=1 fi done -- cgit v1.2.3-54-g00ecf