public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] git-r3.eclass: Ban EAPIs 0 through 3
@ 2018-03-17 23:25 Michał Górny
  2018-03-17 23:25 ` [gentoo-dev] [PATCH 2/2] git-r3.eclass: Unconditionally depend on dev-vcs/git[curl] for HTTPS Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2018-03-17 23:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

The code already uses USE dependencies which are not valid for EAPIs
0 and 1. Furthermore, according to qa-reports the eclass is not used
in any EAPI older than 4.
---
 eclass/git-r3.eclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 55a987b79545..60c0e39bc823 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: git-r3.eclass
@@ -10,7 +10,10 @@
 # git as remote repository.
 
 case "${EAPI:-0}" in
-	0|1|2|3|4|5|6)
+	0|1|2|3)
+		die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}"
+		;;
+	4|5|6)
 		;;
 	*)
 		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-- 
2.16.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-dev] [PATCH 2/2] git-r3.eclass: Unconditionally depend on dev-vcs/git[curl] for HTTPS
  2018-03-17 23:25 [gentoo-dev] [PATCH 1/2] git-r3.eclass: Ban EAPIs 0 through 3 Michał Górny
@ 2018-03-17 23:25 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-03-17 23:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

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 | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 60c0e39bc823..04b3ee27399f 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -25,7 +25,7 @@ EXPORT_FUNCTIONS src_unpack
 if [[ ! ${_GIT_R3} ]]; then
 
 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
-	DEPEND=">=dev-vcs/git-1.8.2.1"
+	DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
 fi
 
 # @ECLASS-VARIABLE: EGIT_CLONE_TYPE
@@ -650,20 +650,6 @@ git-r3_fetch() {
 			local fetch_command=( git fetch "${r}" )
 			local clone_type=${EGIT_CLONE_TYPE}
 
-			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
 				fetch_command+=(
 					--prune
-- 
2.16.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-17 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-17 23:25 [gentoo-dev] [PATCH 1/2] git-r3.eclass: Ban EAPIs 0 through 3 Michał Górny
2018-03-17 23:25 ` [gentoo-dev] [PATCH 2/2] git-r3.eclass: Unconditionally depend on dev-vcs/git[curl] for HTTPS Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox