From 24db6037e69ca7fe9c425cec72111866377adb25 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 17 Oct 2016 17:53:24 +0200 Subject: [PATCH] git-r3.eclass: Make git[curl] warning non-fatal, extend to HTTP, #597356 Make the warning about missing dev-vcs/git[curl] for HTTP(S) support non-fatal since the ebuild can specify non-HTTP(S) fallback URIs which would otherwise be ignored. The eclass will die if all URIs fail anyway. Extend the check to cover both HTTPS and plain HTTP. Reported by Coacher. Bug: https://bugs.gentoo.org/597356 --- eclass/git-r3.eclass | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 0ac9d908729e..817638dc0de4 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -593,13 +593,18 @@ git-r3_fetch() { local fetch_command=( git fetch "${r}" ) local clone_type=${EGIT_CLONE_TYPE} - if [[ ${r} == https://* ]] && ! ROOT=/ has_version 'dev-vcs/git[curl]'; then - eerror "git-r3: fetching from https:// requested. In order to support https," - eerror "dev-vcs/git needs to be built with USE=curl. Example solution:" - eerror - eerror " echo dev-vcs/git curl >> /etc/portage/package.use" - eerror " emerge -1v dev-vcs/git" - die "dev-vcs/git built with USE=curl required." + if [[ ${r} == http://* || ${r} == https://* ]] && + [[ ! ${EGIT_CURL_WARNED} ]] && + ! ROOT=/ has_version 'dev-vcs/git[curl]' + then + ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S)," + ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:" + ewarn + ewarn " echo dev-vcs/git curl >> /etc/portage/package.use" + ewarn " emerge -1v dev-vcs/git" + ewarn + ewarn "HTTP(S) URIs will be skipped." + EGIT_CURL_WARNED=1 fi if [[ ${clone_type} == mirror ]]; then -- 2.26.2