summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-09-26 21:04:42 +0000
committerMichał Górny <mgorny@gentoo.org>2013-09-26 21:04:42 +0000
commit3a371267944fe5aa2fdd554747454e6e2c892dca (patch)
tree7330cfb5898ef4764cf9c204c4774c05ef37ee9c /eclass
parentAutomated update. (diff)
downloadgentoo-2-3a371267944fe5aa2fdd554747454e6e2c892dca.tar.gz
gentoo-2-3a371267944fe5aa2fdd554747454e6e2c892dca.tar.bz2
gentoo-2-3a371267944fe5aa2fdd554747454e6e2c892dca.zip
Fix parsing EGIT_REPO_URI. Bug #486080.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/git-r3.eclass32
2 files changed, 26 insertions, 11 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 4c41ba234a9a..92f20bd67a3e 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.990 2013/09/26 12:38:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.991 2013/09/26 21:04:42 mgorny Exp $
+
+ 26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+ Fix parsing EGIT_REPO_URI. Bug #486080.
26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
Update doc on EGIT_NONSHALLOW.
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index de33397e9569..51d9f43bb437 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.10 2013/09/26 12:38:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.11 2013/09/26 21:04:42 mgorny Exp $
# @ECLASS: git-r3.eclass
# @MAINTAINER:
@@ -376,11 +376,15 @@ _git-r3_smart_fetch() {
git-r3_fetch() {
debug-print-function ${FUNCNAME} "$@"
- if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
- local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+ local repos
+ if [[ ${1} ]]; then
+ repos=( ${1} )
+ elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+ repos=( "${EGIT_REPO_URI[@]}" )
+ else
+ repos=( ${EGIT_REPO_URI} )
fi
- local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
@@ -529,11 +533,15 @@ git-r3_fetch() {
git-r3_checkout() {
debug-print-function ${FUNCNAME} "$@"
- if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
- local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+ local repos
+ if [[ ${1} ]]; then
+ repos=( ${1} )
+ elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+ repos=( "${EGIT_REPO_URI[@]}" )
+ else
+ repos=( ${EGIT_REPO_URI} )
fi
- local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
@@ -630,11 +638,15 @@ git-r3_checkout() {
git-r3_peek_remote_ref() {
debug-print-function ${FUNCNAME} "$@"
- if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
- local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+ local repos
+ if [[ ${1} ]]; then
+ repos=( ${1} )
+ elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+ repos=( "${EGIT_REPO_URI[@]}" )
+ else
+ repos=( ${EGIT_REPO_URI} )
fi
- local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}