From f6e9bb0fd3a2b52c8d3cd1f0b827747fca836170 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 2 Jun 2022 16:50:03 +0100 Subject: [PATCH] toolchain.eclass: fix when no TOOLCHAIN_PATCH_DEV is set Closes: https://bugs.gentoo.org/849326 Signed-off-by: Sam James --- eclass/toolchain.eclass | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d91544797fe82..8200bc2304b68 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -377,12 +377,14 @@ gentoo_urls() { # Newer ebuilds should set TOOLCHAIN_PATCH_DEV and we'll just # return the full URL from the array. - local devspace_url=${devspace_urls[${TOOLCHAIN_PATCH_DEV}]} - if [[ -n ${TOOLCHAIN_PATCH_DEV} && -n ${devspace_url} ]] ; then - local devspace_url_exp=${devspace_url//HTTP/https:\/\/dev.gentoo.org\/} - devspace_url_exp=${devspace_url_exp//URI/$1} - echo ${devspace_url_exp} - return + if [[ -n ${TOOLCHAIN_PATCH_DEV} ]] ; then + local devspace_url=${devspace_urls[${TOOLCHAIN_PATCH_DEV}]} + if [[ -n ${devspace_url} ]] ; then + local devspace_url_exp=${devspace_url//HTTP/https:\/\/dev.gentoo.org\/} + devspace_url_exp=${devspace_url_exp//URI/$1} + echo ${devspace_url_exp} + return + fi fi # But we keep the old fallback list for compatibility with