Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/2] git-r3.eclass: Unconditionally depend on dev-vcs/git[curl] for HTTPS
Date: Sat, 17 Mar 2018 23:26:29
Message-Id: 20180317232535.25872-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] git-r3.eclass: Ban EAPIs 0 through 3 by "Michał Górny"
1 Since HTTPS is strongly preferred in git-r3 eclass, there is no point
2 in optimizing it for non-HTTPS use. Therefore, unconditionally depend
3 on dev-vcs/git[curl] rather than verbosely failing when HTTPS is used
4 and the dependency is not satisfied.
5 ---
6 eclass/git-r3.eclass | 16 +---------------
7 1 file changed, 1 insertion(+), 15 deletions(-)
8
9 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
10 index 60c0e39bc823..04b3ee27399f 100644
11 --- a/eclass/git-r3.eclass
12 +++ b/eclass/git-r3.eclass
13 @@ -25,7 +25,7 @@ EXPORT_FUNCTIONS src_unpack
14 if [[ ! ${_GIT_R3} ]]; then
15
16 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
17 - DEPEND=">=dev-vcs/git-1.8.2.1"
18 + DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
19 fi
20
21 # @ECLASS-VARIABLE: EGIT_CLONE_TYPE
22 @@ -650,20 +650,6 @@ git-r3_fetch() {
23 local fetch_command=( git fetch "${r}" )
24 local clone_type=${EGIT_CLONE_TYPE}
25
26 - if [[ ${r} == http://* || ${r} == https://* ]] &&
27 - [[ ! ${EGIT_CURL_WARNED} ]] &&
28 - ! ROOT=/ has_version 'dev-vcs/git[curl]'
29 - then
30 - ewarn "git-r3: fetching from HTTP(S) requested. In order to support HTTP(S),"
31 - ewarn "dev-vcs/git needs to be built with USE=curl. Example solution:"
32 - ewarn
33 - ewarn " echo dev-vcs/git curl >> /etc/portage/package.use"
34 - ewarn " emerge -1v dev-vcs/git"
35 - ewarn
36 - ewarn "HTTP(S) URIs will be skipped."
37 - EGIT_CURL_WARNED=1
38 - fi
39 -
40 if [[ ${clone_type} == mirror ]]; then
41 fetch_command+=(
42 --prune
43 --
44 2.16.2