diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index fce01d0b..510c98d7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1183,9 +1183,6 @@ if have_function pkgver; then PKGVERFUNC=1 fi -# check we have the software required to process the PKGBUILD -check_software || exit $E_MISSING_MAKEPKG_DEPS - if (( ${#pkgname[@]} > 1 )) || have_function package_${pkgname}; then SPLITPKG=1 fi @@ -1216,19 +1213,6 @@ if have_function package; then PKGFUNC=1 fi -# check if gpg signature is to be created and if signing key is valid -if { [[ -z $SIGNPKG ]] && check_buildenv "sign" "y"; } || [[ $SIGNPKG == 'y' ]]; then - SIGNPKG='y' - if ! gpg --list-secret-key ${GPGKEY:+"$GPGKEY"} &>/dev/null; then - if [[ ! -z $GPGKEY ]]; then - error "$(gettext "The key %s does not exist in your keyring.")" "${GPGKEY}" - else - error "$(gettext "There is no key in your keyring.")" - fi - exit $E_PRETTY_BAD_PRIVACY - fi -fi - if (( PACKAGELIST )); then print_all_package_names exit $E_OK @@ -1266,6 +1250,22 @@ if (( INFAKEROOT )); then exit $E_OK fi +# check we have the software required to process the PKGBUILD +check_software || exit $E_MISSING_MAKEPKG_DEPS + +# check if gpg signature is to be created and if signing key is valid +if { [[ -z $SIGNPKG ]] && check_buildenv "sign" "y"; } || [[ $SIGNPKG == 'y' ]]; then + SIGNPKG='y' + if ! gpg --list-secret-key ${GPGKEY:+"$GPGKEY"} &>/dev/null; then + if [[ ! -z $GPGKEY ]]; then + error "$(gettext "The key %s does not exist in your keyring.")" "${GPGKEY}" + else + error "$(gettext "There is no key in your keyring.")" + fi + exit $E_PRETTY_BAD_PRIVACY + fi +fi + msg "$(gettext "Making package: %s")" "$pkgbase $basever ($(date +%c))" # if we are creating a source-only package, go no further