summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-10-17 17:53:24 +0200
committerMichał Górny <mgorny@gentoo.org>2016-10-17 17:56:35 +0200
commit24db6037e69ca7fe9c425cec72111866377adb25 (patch)
tree6e9461eeb6447b08c54d7faa0393c1c66d9ebc38 /eclass/git-r3.eclass
parentdev-python/python-systemd: bump to 233 (diff)
downloadgentoo-24db6037e69ca7fe9c425cec72111866377adb25.tar.gz
gentoo-24db6037e69ca7fe9c425cec72111866377adb25.tar.bz2
gentoo-24db6037e69ca7fe9c425cec72111866377adb25.zip
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
Diffstat (limited to 'eclass/git-r3.eclass')
-rw-r--r--eclass/git-r3.eclass19
1 files 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