[pacman-dev] [PATCH 1/2] libmakepkg/lint_pkgbuild: fix regression in linting depends=(foo=$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, which promptly failed to build because "-" is not allowed in a pkgver. This 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. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- Ouch! Sorry... scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in | 3 ++- scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in | 3 ++- scripts/libmakepkg/lint_pkgbuild/depends.sh.in | 3 ++- scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in | 3 ++- scripts/libmakepkg/lint_pkgbuild/provides.sh.in | 9 ++++++++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in index 5d15bfb2..a4f297d9 100644 --- a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in @@ -46,7 +46,8 @@ lint_checkdepends() { ver=${checkdepend#*@(<|>|=|>=|<=)} 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..0f81ddb1 100644 --- a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in @@ -46,7 +46,8 @@ lint_conflicts() { ver=${conflict#*@(<|>|=|>=|<=)} 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..cbd97706 100644 --- a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in @@ -46,7 +46,8 @@ lint_depends() { ver=${depend#*@(<|>|=|>=|<=)} 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..fc1549d5 100644 --- a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in @@ -46,7 +46,8 @@ lint_makedepends() { ver=${makedepend#*@(<|>|=|>=|<=)} 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..a0bef4f5 100644 --- a/scripts/libmakepkg/lint_pkgbuild/provides.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/provides.sh.in @@ -37,6 +37,10 @@ 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" @@ -47,9 +51,12 @@ lint_provides() { ver=${provide#*=} 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 } -- 2.17.0
micro-optimization: We only care about temporarily enforcing extglob, so that is the only one we need to explicitly restore. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in | 4 ++-- scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in | 4 ++-- scripts/libmakepkg/lint_pkgbuild/depends.sh.in | 4 ++-- scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in | 4 ++-- scripts/libmakepkg/util/pkgbuild.sh.in | 4 ++-- scripts/libmakepkg/util/util.sh.in | 4 ++-- scripts/makepkg.sh.in | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in index a4f297d9..00a0d5de 100644 --- a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in @@ -37,8 +37,8 @@ lint_checkdepends() { get_pkgbuild_all_split_attributes checkdepends checkdepends_list - # save our shell options and turn on extglob - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob for checkdepend in "${checkdepends_list[@]}"; do diff --git a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in index 0f81ddb1..54b8389d 100644 --- a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in @@ -37,8 +37,8 @@ lint_conflicts() { get_pkgbuild_all_split_attributes conflicts conflicts_list - # save our shell options and turn on extglob - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob for conflict in "${conflicts_list[@]}"; do diff --git a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in index cbd97706..09c1601f 100644 --- a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in @@ -37,8 +37,8 @@ lint_depends() { get_pkgbuild_all_split_attributes depends depends_list - # save our shell options and turn on extglob - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob for depend in "${depends_list[@]}"; do diff --git a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in index fc1549d5..8d70f7d9 100644 --- a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in @@ -37,8 +37,8 @@ lint_makedepends() { get_pkgbuild_all_split_attributes makedepends makedepends_list - # save our shell options and turn on extglob - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob for makedepend in "${makedepends_list[@]}"; do diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in index 2db46f1f..632f314d 100644 --- a/scripts/libmakepkg/util/pkgbuild.sh.in +++ b/scripts/libmakepkg/util/pkgbuild.sh.in @@ -80,8 +80,8 @@ extract_function_variable() { printf -v attr_regex '^[[:space:]]* %s\+?=[^(]' "$2" fi - # save our shell options and turn on extglob - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob while read -r; do diff --git a/scripts/libmakepkg/util/util.sh.in b/scripts/libmakepkg/util/util.sh.in index f9af5f32..726d2005 100644 --- a/scripts/libmakepkg/util/util.sh.in +++ b/scripts/libmakepkg/util/util.sh.in @@ -42,8 +42,8 @@ is_array() { local v=$1 local ret=1 - # this function requires extglob - save current options to restore later - local shellopts=$(shopt -p) + # this function requires extglob - save current status to restore later + local shellopts=$(shopt -p extglob) shopt -s extglob if [[ $(declare -p "$v") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index eee8a56c..b845c5d7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -275,7 +275,7 @@ handle_deps() { # we might need the new system environment # save our shell options and turn off extglob - local shellopts=$(shopt -p) + local shellopts=$(shopt -p extglob) shopt -u extglob source /etc/profile &>/dev/null eval "$shellopts" -- 2.17.0
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 <eschwartz@archlinux.org> --- v2: this applies equally to epoch scripts/libmakepkg/lint_pkgbuild/3 | 0 .../libmakepkg/lint_pkgbuild/checkdepends.sh.in | 8 +++++--- scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in | 8 +++++--- scripts/libmakepkg/lint_pkgbuild/depends.sh.in | 8 +++++--- scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in | 8 +++++--- scripts/libmakepkg/lint_pkgbuild/provides.sh.in | 14 +++++++++++--- 6 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 scripts/libmakepkg/lint_pkgbuild/3 diff --git a/scripts/libmakepkg/lint_pkgbuild/3 b/scripts/libmakepkg/lint_pkgbuild/3 new file mode 100644 index 00000000..e69de29b diff --git a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in index 5d15bfb2..2cf636ad 100644 --- a/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/checkdepends.sh.in @@ -42,11 +42,13 @@ lint_checkdepends() { shopt -s extglob for checkdepend in "${checkdepends_list[@]}"; do - name=${checkdepend%%@(<|>|=|>=|<=)*} - ver=${checkdepend#*@(<|>|=|>=|<=)} + name=${checkdepend%@(<|>|=|>=|<=)*} + # remove optional epoch in version specifier + ver=${checkdepend##*@(<|>|=|>=|<=)?(+([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..e83ae643 100644 --- a/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in @@ -42,11 +42,13 @@ lint_conflicts() { shopt -s extglob for conflict in "${conflicts_list[@]}"; do - name=${conflict%%@(<|>|=|>=|<=)*} - ver=${conflict#*@(<|>|=|>=|<=)} + name=${conflict%@(<|>|=|>=|<=)*} + # remove optional epoch in version specifier + ver=${conflict##*@(<|>|=|>=|<=)?(+([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..c16a3c1d 100644 --- a/scripts/libmakepkg/lint_pkgbuild/depends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/depends.sh.in @@ -42,11 +42,13 @@ lint_depends() { shopt -s extglob for depend in "${depends_list[@]}"; do - name=${depend%%@(<|>|=|>=|<=)*} - ver=${depend#*@(<|>|=|>=|<=)} + name=${depend%@(<|>|=|>=|<=)*} + # remove optional epoch in version specifier + ver=${depend##*@(<|>|=|>=|<=)?(+([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..a0a8739b 100644 --- a/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in @@ -42,11 +42,13 @@ lint_makedepends() { shopt -s extglob for makedepend in "${makedepends_list[@]}"; do - name=${makedepend%%@(<|>|=|>=|<=)*} - ver=${makedepend#*@(<|>|=|>=|<=)} + name=${makedepend%@(<|>|=|>=|<=)*} + # remove optional epoch in version specifier + ver=${makedepend##*@(<|>|=|>=|<=)?(+([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..ca0b74d3 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##*=?(+([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 } -- 2.17.0
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 <eschwartz@archlinux.org> --- v3: ugh, that wasn't right at all. names must be greedily trimmed, because otherwise, given >=, we end up with name="foo>" scripts/libmakepkg/lint_pkgbuild/3 | 0 .../libmakepkg/lint_pkgbuild/checkdepends.sh.in | 6 ++++-- scripts/libmakepkg/lint_pkgbuild/conflicts.sh.in | 6 ++++-- scripts/libmakepkg/lint_pkgbuild/depends.sh.in | 6 ++++-- scripts/libmakepkg/lint_pkgbuild/makedepends.sh.in | 6 ++++-- scripts/libmakepkg/lint_pkgbuild/provides.sh.in | 14 +++++++++++--- 6 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 scripts/libmakepkg/lint_pkgbuild/3 diff --git a/scripts/libmakepkg/lint_pkgbuild/3 b/scripts/libmakepkg/lint_pkgbuild/3 new file mode 100644 index 00000000..e69de29b 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 } -- 2.17.0
participants (1)
-
Eli Schwartz