public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] git-r3.eclass: Print possible override vars for user convenience
@ 2018-09-15 15:54 Michał Górny
  2018-09-15 15:54 ` [gentoo-dev] [PATCH 2/2] git-r3.eclass: Undocument deprecated EGIT_LIVE_* API Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2018-09-15 15:54 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/git-r3.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 48fac96ee358..3c09b6682ef5 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -586,6 +586,8 @@ git-r3_fetch() {
 	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
 
+	einfo "Repository id: ${GIT_DIR##*/}"
+
 	# prepend the local mirror if applicable
 	if [[ ${EGIT_MIRROR_URI} ]]; then
 		repos=(
@@ -618,10 +620,11 @@ git-r3_fetch() {
 			COMMIT_DATE:commit_date
 		)
 
-		local localvar livevar live_warn=
+		local localvar livevar live_warn= override_vars=()
 		for localvar in "${varmap[@]}"; do
 			livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
 			localvar=${localvar#*:}
+			override_vars+=( "${livevar}" )
 
 			if [[ -n ${!livevar} ]]; then
 				[[ ${localvar} == repos ]] && repos=()
@@ -633,6 +636,13 @@ git-r3_fetch() {
 
 		if [[ ${live_warn} ]]; then
 			ewarn "No support will be provided."
+		else
+			einfo "To override fetched repository properties, use:"
+			local x
+			for x in "${override_vars[@]}"; do
+				einfo "  ${x}"
+			done
+			einfo
 		fi
 	fi
 
-- 
2.19.0



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

* [gentoo-dev] [PATCH 2/2] git-r3.eclass: Undocument deprecated EGIT_LIVE_* API
  2018-09-15 15:54 [gentoo-dev] [PATCH 1/2] git-r3.eclass: Print possible override vars for user convenience Michał Górny
@ 2018-09-15 15:54 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-09-15 15:54 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/git-r3.eclass | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 3c09b6682ef5..a1ad0d238dc9 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -122,8 +122,6 @@ fi
 # URIs are completely unsecured and their use (even if only as
 # a fallback) renders the ebuild completely vulnerable to MITM attacks.
 #
-# It can be overridden via env using ${PN}_LIVE_REPO variable.
-#
 # Can be a whitespace-separated list or an array.
 #
 # Example:
@@ -152,8 +150,6 @@ fi
 # @DESCRIPTION:
 # The branch name to check out. If unset, the upstream default (HEAD)
 # will be used.
-#
-# It can be overridden via env using ${PN}_LIVE_BRANCH variable.
 
 # @ECLASS-VARIABLE: EGIT_COMMIT
 # @DEFAULT_UNSET
@@ -162,8 +158,6 @@ fi
 # commit from the branch will be used. Note that if set to a commit
 # not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
 # the commit is available.
-#
-# It can be overridden via env using ${PN}_LIVE_COMMIT variable.
 
 # @ECLASS-VARIABLE: EGIT_COMMIT_DATE
 # @DEFAULT_UNSET
@@ -178,8 +172,6 @@ fi
 # (assuming that merges are done correctly). In other words, each merge
 # will be considered alike a single commit with date corresponding
 # to the merge commit date.
-#
-# It can be overridden via env using ${PN}_LIVE_COMMIT_DATE variable.
 
 # @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
 # @DESCRIPTION:
@@ -262,6 +254,7 @@ _git-r3_env_setup() {
 	esc_pn=${PN//[-+]/_}
 	[[ ${esc_pn} == [0-9]* ]] && esc_pn=_${esc_pn}
 
+	# note: deprecated, use EGIT_OVERRIDE_* instead
 	livevar=${esc_pn}_LIVE_REPO
 	EGIT_REPO_URI=${!livevar-${EGIT_REPO_URI}}
 	[[ ${!livevar} ]] \
-- 
2.19.0



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

end of thread, other threads:[~2018-09-15 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-15 15:54 [gentoo-dev] [PATCH 1/2] git-r3.eclass: Print possible override vars for user convenience Michał Górny
2018-09-15 15:54 ` [gentoo-dev] [PATCH 2/2] git-r3.eclass: Undocument deprecated EGIT_LIVE_* API 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