Merge pull request #998 from marco-m/ubuntu-gnupg1-curl

Handle renaming of gnupg-curl to gnupg1-curl for Ubuntu 16.10
This commit is contained in:
Nicole Thomas 2016-12-20 16:00:56 -07:00 committed by GitHub
commit c74cfa67fb

View file

@ -1459,6 +1459,14 @@ if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ $_PIP_ALL -eq $BS_TRUE ]);then
exit 1 exit 1
fi fi
# Starting from Ubuntu 16.10, gnupg-curl has been renamed to gnupg1-curl.
GNUPG_CURL="gnupg-curl"
if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && [ "${DISTRO_VERSION}" = "16.10" ]); then
GNUPG_CURL="gnupg1-curl"
fi
#--- FUNCTION ------------------------------------------------------------------------------------------------------- #--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __function_defined # NAME: __function_defined
# DESCRIPTION: Checks if a function is defined within this scripts scope # DESCRIPTION: Checks if a function is defined within this scripts scope
@ -1503,7 +1511,7 @@ __apt_get_upgrade_noinput() {
__apt_key_fetch() { __apt_key_fetch() {
url=$1 url=$1
__apt_get_install_noinput gnupg-curl || return 1 __apt_get_install_noinput ${GNUPG_CURL} || return 1
# shellcheck disable=SC2086 # shellcheck disable=SC2086
apt-key adv ${_GPG_ARGS} --fetch-keys "$url"; return $? apt-key adv ${_GPG_ARGS} --fetch-keys "$url"; return $?