summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/git-r3.eclass13
2 files changed, 15 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 455f1caf8edf..44016a349bfe 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1033 2013/10/22 19:23:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1034 2013/10/26 06:19:13 mgorny Exp $
+
+ 26 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+ Fix handling relative submodule paths.
22 Oct 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Fix failing to pass default install arguments when user passes an additional
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 743619fa2a32..fd6886f07373 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.18 2013/10/14 20:30:00 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.19 2013/10/26 06:19:13 mgorny Exp $
# @ECLASS: git-r3.eclass
# @MAINTAINER:
@@ -515,8 +515,13 @@ git-r3_fetch() {
if [[ ! ${commit} ]]; then
die "Unable to get commit id for submodule ${subname}"
fi
+ if [[ ${url} == ./* || ${url} == ../* ]]; then
+ local subrepos=( "${repos[@]/%//${url}}" )
+ else
+ local subrepos=( "${url}" )
+ fi
- git-r3_fetch "${url}" "${commit}" "${local_id}/${subname}"
+ git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
submodules=( "${submodules[@]:3}" ) # shift
done
@@ -615,6 +620,10 @@ git-r3_checkout() {
local url=${submodules[1]}
local path=${submodules[2]}
+ if [[ ${url} == ./* || ${url} == ../* ]]; then
+ url=${repos[0]%%/}/${url}
+ fi
+
git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
"${local_id}/${subname}"