Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: eclass/
Date: Tue, 22 Aug 2017 21:33:48
Message-Id: 1503437656.20662b9aa58fe14d123fccf9b8c4e0d4bb44b508.nimiux@gentoo
1 commit: 20662b9aa58fe14d123fccf9b8c4e0d4bb44b508
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 22 21:34:16 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 22 21:34:16 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=20662b9a
7
8 git-r3.eclass: Syncs with ebuild repository
9
10 eclass/git-r3.eclass | 26 +++++++++++---------------
11 1 file changed, 11 insertions(+), 15 deletions(-)
12
13 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
14 index f76f1a7e..bc7d4d92 100644
15 --- a/eclass/git-r3.eclass
16 +++ b/eclass/git-r3.eclass
17 @@ -1,6 +1,5 @@
18 -# Copyright 1999-2015 Gentoo Foundation
19 +# Copyright 1999-2017 Gentoo Foundation
20 # Distributed under the terms of the GNU General Public License v2
21 -# $Id$
22
23 # @ECLASS: git-r3.eclass
24 # @MAINTAINER:
25 @@ -18,12 +17,6 @@ case "${EAPI:-0}" in
26 ;;
27 esac
28
29 -if [[ ! ${_GIT_R3} ]]; then
30 -
31 -inherit eutils
32 -
33 -fi
34 -
35 EXPORT_FUNCTIONS src_unpack
36
37 if [[ ! ${_GIT_R3} ]]; then
38 @@ -154,8 +147,9 @@ fi
39 # @DEFAULT_UNSET
40 # @DESCRIPTION:
41 # The tag name or commit identifier to check out. If unset, newest
42 -# commit from the branch will be used. If set, EGIT_BRANCH will
43 -# be ignored.
44 +# commit from the branch will be used. Note that if set to a commit
45 +# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
46 +# the commit is available.
47 #
48 # It can be overriden via env using ${PN}_LIVE_COMMIT variable.
49
50 @@ -163,7 +157,8 @@ fi
51 # @DEFAULT_UNSET
52 # @DESCRIPTION:
53 # Attempt to check out the repository state for the specified timestamp.
54 -# The date should be in format understood by 'git rev-list'.
55 +# The date should be in format understood by 'git rev-list'. The commits
56 +# on EGIT_BRANCH will be considered.
57 #
58 # The eclass will select the last commit with commit date preceding
59 # the specified date. When merge commits are found, only first parents
60 @@ -447,10 +442,11 @@ _git-r3_set_submodules() {
61 submodule."${subname}".update)
62 [[ ${upd} == none ]] && continue
63
64 - # https://github.com/git/git/blob/master/refs.c#L39
65 - # for now, we just filter /. because of #572312
66 - local enc_subname=${subname//\/.//_}
67 - [[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
68 + # https://github.com/git/git/blob/master/refs.c#L31
69 + # we are more restrictive than git itself but that should not
70 + # cause any issues, #572312, #606950
71 + # TODO: check escaped names for collisions
72 + local enc_subname=${subname//[^a-zA-Z0-9-]/_}
73
74 submodules+=(
75 "${enc_subname}"