summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/lint_pkgbuild/depends.sh.in')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/depends.sh.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
index e363a039..aba43825 100644
--- a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
@@ -23,8 +23,8 @@ LIBMAKEPKG_LINT_PKGBUILD_DEPENDS_SH=1
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+source "$LIBRARY/lint_pkgbuild/fullpkgver.sh"
source "$LIBRARY/lint_pkgbuild/pkgname.sh"
-source "$LIBRARY/lint_pkgbuild/pkgver.sh"
source "$LIBRARY/util/message.sh"
source "$LIBRARY/util/pkgbuild.sh"
@@ -43,13 +43,13 @@ lint_depends() {
for depend in "${depends_list[@]}"; do
name=${depend%%@(<|>|=|>=|<=)*}
- # remove optional epoch in version specifier
- ver=${depend##$name@(<|>|=|>=|<=)?(+([0-9]):)}
lint_one_pkgname depends "$name" || ret=1
- # Don't validate empty version because of https://bugs.archlinux.org/task/58776
- if [[ $ver != $depend && -n $ver ]]; then
- # remove optional pkgrel in version specifier
- check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" depends || ret=1
+ if [[ $name != $depend ]]; then
+ ver=${depend##$name@(<|>|=|>=|<=)}
+ # Don't validate empty version because of https://bugs.archlinux.org/task/58776
+ if [[ -n $ver ]]; then
+ check_fullpkgver "$ver" depends || ret=1
+ fi
fi
done