Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 18 Sep 2018 06:19:15
Message-Id: 1537251539.74cfb1b0d4aaba426d3edec51e5c30daf70aa25b.mgorny@gentoo
1 commit: 74cfb1b0d4aaba426d3edec51e5c30daf70aa25b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 15 15:51:37 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 18 06:18:59 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74cfb1b0
7
8 git-r3.eclass: Print possible override vars for user convenience
9
10 eclass/git-r3.eclass | 12 +++++++++++-
11 1 file changed, 11 insertions(+), 1 deletion(-)
12
13 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
14 index 48fac96ee35..3c09b6682ef 100644
15 --- a/eclass/git-r3.eclass
16 +++ b/eclass/git-r3.eclass
17 @@ -586,6 +586,8 @@ git-r3_fetch() {
18 local -x GIT_DIR
19 _git-r3_set_gitdir "${repos[0]}"
20
21 + einfo "Repository id: ${GIT_DIR##*/}"
22 +
23 # prepend the local mirror if applicable
24 if [[ ${EGIT_MIRROR_URI} ]]; then
25 repos=(
26 @@ -618,10 +620,11 @@ git-r3_fetch() {
27 COMMIT_DATE:commit_date
28 )
29
30 - local localvar livevar live_warn=
31 + local localvar livevar live_warn= override_vars=()
32 for localvar in "${varmap[@]}"; do
33 livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
34 localvar=${localvar#*:}
35 + override_vars+=( "${livevar}" )
36
37 if [[ -n ${!livevar} ]]; then
38 [[ ${localvar} == repos ]] && repos=()
39 @@ -633,6 +636,13 @@ git-r3_fetch() {
40
41 if [[ ${live_warn} ]]; then
42 ewarn "No support will be provided."
43 + else
44 + einfo "To override fetched repository properties, use:"
45 + local x
46 + for x in "${override_vars[@]}"; do
47 + einfo " ${x}"
48 + done
49 + einfo
50 fi
51 fi