commit:     f6e9bb0fd3a2b52c8d3cd1f0b827747fca836170
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  2 15:50:03 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun  2 15:50:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6e9bb0f

toolchain.eclass: fix when no TOOLCHAIN_PATCH_DEV is set

Closes: https://bugs.gentoo.org/849326
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d91544797fe8..8200bc2304b6 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

Reply via email to