git-r3.eclass: Unconditionally depend on dev-vcs/git[curl] for HTTPS
authorMichał Górny <mgorny@gentoo.org>
Sat, 17 Mar 2018 23:21:49 +0000 (00:21 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 13 Jun 2018 08:05:30 +0000 (10:05 +0200)
Since HTTPS is strongly preferred in git-r3 eclass, there is no point
in optimizing it for non-HTTPS use. Therefore, unconditionally depend
on dev-vcs/git[curl] rather than verbosely failing when HTTPS is used
and the dependency is not satisfied.

eclass/git-r3.eclass

index c5c76232eb41129dc0c7e0e4415b7a6a988d52b3..7fe9bcb40fa48a001653f7d49be79771501c35a8 100644 (file)
@@ -26,9 +26,9 @@ if [[ ! ${_GIT_R3} ]]; then
 
 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
        if [[ ${EAPI:-0} != [0123456] ]]; then
-               BDEPEND=">=dev-vcs/git-1.8.2.1"
+               BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
        else
-               DEPEND=">=dev-vcs/git-1.8.2.1"
+               DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
        fi
 fi
 
@@ -654,31 +654,6 @@ git-r3_fetch() {
                        local fetch_command=( git fetch "${r}" )
                        local clone_type=${EGIT_CLONE_TYPE}
 
-                       if [[ ${r} == http://* || ${r} == https://* ]] &&
-                                       [[ ! ${EGIT_CURL_WARNED} ]]
-                       then
-                               case ${EAPI:-0} in
-                                       0|1|2|3|4)
-                                               ROOT=/ has_version 'dev-vcs/git[curl]';;
-                                       5|6)
-                                               has_version --host-root 'dev-vcs/git[curl]';;
-                                       *)
-                                               has_version -b 'dev-vcs/git[curl]';;
-                               esac
-
-                               if [[ ${?} -ne 0 ]]; 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."
-                               fi
-
-                               EGIT_CURL_WARNED=1
-                       fi
-
                        if [[ ${clone_type} == mirror ]]; then
                                fetch_command+=(
                                        --prune