index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-06-21 12:39:21 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-09-19 11:10:04 +1000 |
commit | 3d5a056452fe897e533edfac2ddbe2d1ca702a6e (patch) | |
tree | ba116e135a28bd37ad8ebeb4e34c9734e032807f /scripts/libmakepkg | |
parent | 961ef1a4c8cfc0fa7b8da4e6cb77d8327934e32f (diff) |
-rw-r--r-- | scripts/libmakepkg/lint_pkgbuild/package_function.sh.in | 9 |
diff --git a/scripts/libmakepkg/lint_pkgbuild/package_function.sh.in b/scripts/libmakepkg/lint_pkgbuild/package_function.sh.in index e52f1325..1b973c3f 100644 --- a/scripts/libmakepkg/lint_pkgbuild/package_function.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/package_function.sh.in @@ -34,11 +34,18 @@ lint_package_function() { local i ret=0 if (( ${#pkgname[@]} == 1 )); then - if have_function 'build' && ! { have_function 'package' || have_function "package_$pkgname"; }; then + if have_function 'package' && have_function "package_$pkgname"; then + error "$(gettext "Conflicting %s and %s functions in %s")" "package()" "package_$pkgname()" "$BUILDFILE" + ret=1 + elif have_function 'build' && ! { have_function 'package' || have_function "package_$pkgname"; }; then error "$(gettext "Missing %s function in %s")" "package()" "$BUILDFILE" ret=1 fi else + if have_function "package"; then + error "$(gettext "Extra %s function for split package '%s'")" "package()" "$pkgbase" + ret=1 + fi for i in "${pkgname[@]}"; do if ! have_function "package_$i"; then error "$(gettext "Missing %s function for split package '%s'")" "package_$i()" "$i" |