summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/30
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in6
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in6
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/depends.sh.in6
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in6
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/provides.sh.in14
6 files changed, 27 insertions, 11 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/3 b/scripts/libmakepkg/lint_pkgbuild/3
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/scripts/libmakepkg/lint_pkgbuild/3
diff --git a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in
index 5d15bfb2..fb289a67 100644
--- a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in
@@ -43,10 +43,12 @@ lint_checkdepends() {
for checkdepend in "${checkdepends_list[@]}"; do
name=${checkdepend%%@(<|>|=|>=|<=)*}
- ver=${checkdepend#*@(<|>|=|>=|<=)}
+ # remove optional epoch in version specifier
+ ver=${checkdepend##$name@(<|>|=|>=|<=)?(+([0-9]):)}
lint_one_pkgname checkdepends "$name" || ret=1
if [[ $ver != $checkdepend ]]; then
- check_pkgver "$ver" checkdepends || ret=1
+ # remove optional pkgrel in version specifier
+ check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" checkdepends || ret=1
fi
done
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
diff --git a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
index f17bc545..d90a15f8 100644
--- a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in
@@ -43,10 +43,12 @@ lint_depends() {
for depend in "${depends_list[@]}"; do
name=${depend%%@(<|>|=|>=|<=)*}
- ver=${depend#*@(<|>|=|>=|<=)}
+ # remove optional epoch in version specifier
+ ver=${depend##$name@(<|>|=|>=|<=)?(+([0-9]):)}
lint_one_pkgname depends "$name" || ret=1
if [[ $ver != $depend ]]; then
- check_pkgver "$ver" depends || ret=1
+ # remove optional pkgrel in version specifier
+ check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" depends || ret=1
fi
done
diff --git a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in
index 1d0762fb..55ca4e28 100644
--- a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in
@@ -43,10 +43,12 @@ lint_makedepends() {
for makedepend in "${makedepends_list[@]}"; do
name=${makedepend%%@(<|>|=|>=|<=)*}
- ver=${makedepend#*@(<|>|=|>=|<=)}
+ # remove optional epoch in version specifier
+ ver=${makedepend##$name@(<|>|=|>=|<=)?(+([0-9]):)}
lint_one_pkgname makedepends "$name" || ret=1
if [[ $ver != $makedepend ]]; then
- check_pkgver "$ver" makedepends || ret=1
+ # remove optional pkgrel in version specifier
+ check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" makedepends || ret=1
fi
done
diff --git a/scripts/libmakepkg/lint_pkgbuild/provides.sh.in b/scripts/libmakepkg/lint_pkgbuild/provides.sh.in
index 7500a88a..102be08e 100644
--- a/scripts/libmakepkg/lint_pkgbuild/provides.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/provides.sh.in
@@ -37,19 +37,27 @@ lint_provides() {
get_pkgbuild_all_split_attributes provides provides_list
+ # this function requires extglob - save current status to restore later
+ local shellopts=$(shopt -p extglob)
+ shopt -s extglob
+
for provide in "${provides_list[@]}"; do
if [[ $provide == *['<>']* ]]; then
error "$(gettext "%s array cannot contain comparison (< or >) operators.")" "provides"
ret=1
continue
fi
- name=${provide%%=*}
- ver=${provide#*=}
+ name=${provide%=*}
+ # remove optional epoch in version specifier
+ ver=${provide##$name=?(+([0-9]):)}
lint_one_pkgname provides "$name" || ret=1
if [[ $ver != $provide ]]; then
- check_pkgver "$ver" provides || ret=1
+ # remove optional pkgrel in version specifier
+ check_pkgver "${ver%-+([0-9])?(.+([0-9]))}" provides || ret=1
fi
done
+ eval "$shellopts"
+
return $ret
}