commit:     b4de28372738f421ce5b0b808bcb82b5d6021ab4
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 19 08:34:10 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Aug 19 08:34:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b4de2837

scripts/bootstrap-prefix: add workaround instructions for download problems

 scripts/bootstrap-prefix.sh | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index ad21815f9e..bb25d293de 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -2561,6 +2561,7 @@ EOF
        # deal with the bash-constructs we use in stage3 and onwards
        hash -r
 
+       local https_needed=no
        if ! [[ -e ${EPREFIX}/.stage2-finished ]] \
                && ! ${BASH} ${BASH_SOURCE[0]} "${EPREFIX}" stage2_log ; then
                # stage 2 fail
@@ -2573,14 +2574,23 @@ EOF
                for log in 
"${EPREFIX}"{/tmp,}/var/tmp/portage/*/*/temp/build.log ; do
                        [[ -e ${log} ]] || continue
                        echo "  ${log}"
+                       grep -q "HTTPS support not compiled in" "${log}" && 
https_needed=yes
                done
                [[ -e ${log} ]] || echo "  (no build logs found?!?)"
+               if [[ ${https_needed} == "yes" ]] ; then
+                       cat << EOF
+It seems one of your logs indicates a download problem due to missing
+HTTPS support.  If this appears to be the problem for real, you can work
+around this for now by downloading the file manually and placing it in
+  "${EPREFIX}"/usr/portage/distfiles
+I will find it when you run me again.  If this is NOT the problem, then
+EOF
+               fi
                cat << EOF
 I have no clue, really.  Please find friendly folks in #gentoo-prefix on
 irc.gentoo.org, [email protected] mailing list, or file a bug
-at bugs.gentoo.org under Gentoo/Alt, Prefix Support. I am defeated.
-I am of no use here any more.
-Maybe you can find some clues in ${EPREFIX}/stage2.log
+at bugs.gentoo.org under Gentoo/Alt, Prefix Support.
+Remember you might find some clues in ${EPREFIX}/stage2.log
 EOF
                exit 1
        fi
@@ -2601,8 +2611,18 @@ EOF
                for log in 
"${EPREFIX}"{/tmp,}/var/tmp/portage/*/*/temp/build.log ; do
                        [[ -e ${log} ]] || continue
                        echo "  ${log}"
+                       grep -q "HTTPS support not compiled in" "${log}" && 
https_needed=yes
                done
                [[ -e ${log} ]] || echo "  (no build logs found?!?)"
+               if [[ ${https_needed} == "yes" ]] ; then
+                       cat << EOF
+It seems one of your logs indicates a download problem due to missing
+HTTPS support.  If this appears to be the problem for real, you can work
+around this for now by downloading the file manually and placing it in
+  "${EPREFIX}"/usr/portage/distfiles
+I will find it when you run me again.  If this is NOT the problem, then
+EOF
+               fi
                cat << EOF
 I have no clue, really.  Please find friendly folks in #gentoo-prefix on
 irc.gentoo.org, [email protected] mailing list, or file a bug

Reply via email to