/[gentoo-x86]/eclass/git-r3.eclass
Gentoo

Diff of /eclass/git-r3.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.16 Revision 1.17
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.16 2013/10/13 07:14:58 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.17 2013/10/14 13:32:33 mgorny Exp $
4 4
5# @ECLASS: git-r3.eclass 5# @ECLASS: git-r3.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
210 GIT_DIR=${EGIT3_STORE_DIR}/${repo_name} 210 GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
211 211
212 if [[ ! -d ${EGIT3_STORE_DIR} ]]; then 212 if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
213 ( 213 (
214 addwrite / 214 addwrite /
215 mkdir -m0755 -p "${EGIT3_STORE_DIR}" 215 mkdir -m0755 -p "${EGIT3_STORE_DIR}" || die
216 ) || die "Unable to create ${EGIT3_STORE_DIR}" 216 ) || die "Unable to create ${EGIT3_STORE_DIR}"
217 fi 217 fi
218 218
219 addwrite "${EGIT3_STORE_DIR}" 219 addwrite "${EGIT3_STORE_DIR}"
220 if [[ ! -d ${GIT_DIR} ]]; then 220 if [[ ! -d ${GIT_DIR} ]]; then
252 l=${l#submodule.} 252 l=${l#submodule.}
253 local subname=${l%%.url=*} 253 local subname=${l%%.url=*}
254 254
255 # skip modules that have 'update = none', bug #487262. 255 # skip modules that have 'update = none', bug #487262.
256 local upd=$(echo "${data}" | git config -f /dev/fd/0 \ 256 local upd=$(echo "${data}" | git config -f /dev/fd/0 \
257 submodule."${subname}".update) 257 submodule."${subname}".update || die)
258 [[ ${upd} == none ]] && continue 258 [[ ${upd} == none ]] && continue
259 259
260 submodules+=( 260 submodules+=(
261 "${subname}" 261 "${subname}"
262 "$(echo "${data}" | git config -f /dev/fd/0 \ 262 "$(echo "${data}" | git config -f /dev/fd/0 \
263 submodule."${subname}".url)" 263 submodule."${subname}".url || die)"
264 "$(echo "${data}" | git config -f /dev/fd/0 \ 264 "$(echo "${data}" | git config -f /dev/fd/0 \
265 submodule."${subname}".path)" 265 submodule."${subname}".path || die)"
266 ) 266 )
267 done < <(echo "${data}" | git config -f /dev/fd/0 -l) 267 done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
268} 268}
269 269
270# @FUNCTION: _git-r3_smart_fetch 270# @FUNCTION: _git-r3_smart_fetch
271# @USAGE: <git-fetch-args>... 271# @USAGE: <git-fetch-args>...
272# @DESCRIPTION: 272# @DESCRIPTION:
559 local local_id=${3:-${CATEGORY}/${PN}/${SLOT}} 559 local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
560 560
561 local -x GIT_DIR GIT_WORK_TREE 561 local -x GIT_DIR GIT_WORK_TREE
562 _git-r3_set_gitdir "${repos[0]}" 562 _git-r3_set_gitdir "${repos[0]}"
563 GIT_WORK_TREE=${out_dir} 563 GIT_WORK_TREE=${out_dir}
564 mkdir -p "${GIT_WORK_TREE}" 564 mkdir -p "${GIT_WORK_TREE}" || die
565 565
566 einfo "Checking out ${repos[0]} to ${out_dir} ..." 566 einfo "Checking out ${repos[0]} to ${out_dir} ..."
567 567
568 if ! git cat-file -e refs/heads/"${local_id}"/__main__ 568 if ! git cat-file -e refs/heads/"${local_id}"/__main__
569 then 569 then

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20