index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-04-03 17:48:14 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-04-29 21:49:05 +1000 |
commit | 91b72cc386ca03241791748da5da2b150c724ace (patch) | |
tree | acd1519d07a1a3eeb6913ba7bd2606edb00e263f /scripts/libmakepkg/lint_pkgbuild/provides.sh.in | |
parent | bcaf1b84ff0f0709d35cd0adb1f13965d1101aeb (diff) |
-rw-r--r-- | scripts/libmakepkg/lint_pkgbuild/provides.sh.in | 29 |
diff --git a/scripts/libmakepkg/lint_pkgbuild/provides.sh.in b/scripts/libmakepkg/lint_pkgbuild/provides.sh.in index c2407dc0..7500a88a 100644 --- a/scripts/libmakepkg/lint_pkgbuild/provides.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/provides.sh.in @@ -23,6 +23,8 @@ LIBMAKEPKG_LINT_PKGBUILD_PROVIDES_SH=1 LIBRARY=${LIBRARY:-'@libmakepkgdir@'} +source "$LIBRARY/lint_pkgbuild/pkgname.sh" +source "$LIBRARY/lint_pkgbuild/pkgver.sh" source "$LIBRARY/util/message.sh" source "$LIBRARY/util/pkgbuild.sh" @@ -31,30 +33,21 @@ lint_pkgbuild_functions+=('lint_provides') lint_provides() { - local a list name provides_list ret=0 + local provides_list provide name ver ret=0 - provides_list=("${provides[@]}") - for a in "${arch[@]}"; do - array_build list "provides_$a" - provides_list+=("${list[@]}") - done - - for name in "${pkgname[@]}"; do - if extract_function_variable "package_$name" provides 1 list; then - provides_list+=("${list[@]}") - fi - - for a in "${arch[@]}"; do - if extract_function_variable "package_$name" "provides_$a" 1 list; then - provides_list+=("${list[@]}") - fi - done - done + get_pkgbuild_all_split_attributes provides provides_list 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#*=} + lint_one_pkgname provides "$name" || ret=1 + if [[ $ver != $provide ]]; then + check_pkgver "$ver" provides || ret=1 fi done |