summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChema Alonso Josa <nimiux@gentoo.org>2017-08-22 23:34:16 +0200
committerChema Alonso Josa <nimiux@gentoo.org>2018-03-09 22:34:16 +0100
commitd495ea558fa02392204de0bf4cac9df5050aeafe (patch)
treefcbca6ceb6d38d01cea1fdf57abad27525bdad3c
parentcommon-lisp-3.eclass: Updates header and CL_BINARY variable (diff)
downloadlisp-d495ea558fa02392204de0bf4cac9df5050aeafe.tar.gz
lisp-d495ea558fa02392204de0bf4cac9df5050aeafe.tar.bz2
lisp-d495ea558fa02392204de0bf4cac9df5050aeafe.zip
git-r3.eclass: Syncs with ebuild repository
-rw-r--r--eclass/git-r3.eclass26
1 files changed, 11 insertions, 15 deletions
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index f76f1a7e..bc7d4d92 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,6 +1,5 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
# @ECLASS: git-r3.eclass
# @MAINTAINER:
@@ -18,12 +17,6 @@ case "${EAPI:-0}" in
;;
esac
-if [[ ! ${_GIT_R3} ]]; then
-
-inherit eutils
-
-fi
-
EXPORT_FUNCTIONS src_unpack
if [[ ! ${_GIT_R3} ]]; then
@@ -154,8 +147,9 @@ fi
# @DEFAULT_UNSET
# @DESCRIPTION:
# The tag name or commit identifier to check out. If unset, newest
-# commit from the branch will be used. If set, EGIT_BRANCH will
-# be ignored.
+# 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 overriden via env using ${PN}_LIVE_COMMIT variable.
@@ -163,7 +157,8 @@ fi
# @DEFAULT_UNSET
# @DESCRIPTION:
# Attempt to check out the repository state for the specified timestamp.
-# The date should be in format understood by 'git rev-list'.
+# The date should be in format understood by 'git rev-list'. The commits
+# on EGIT_BRANCH will be considered.
#
# The eclass will select the last commit with commit date preceding
# the specified date. When merge commits are found, only first parents
@@ -447,10 +442,11 @@ _git-r3_set_submodules() {
submodule."${subname}".update)
[[ ${upd} == none ]] && continue
- # https://github.com/git/git/blob/master/refs.c#L39
- # for now, we just filter /. because of #572312
- local enc_subname=${subname//\/.//_}
- [[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
+ # https://github.com/git/git/blob/master/refs.c#L31
+ # we are more restrictive than git itself but that should not
+ # cause any issues, #572312, #606950
+ # TODO: check escaped names for collisions
+ local enc_subname=${subname//[^a-zA-Z0-9-]/_}
submodules+=(
"${enc_subname}"