/[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.19 Revision 1.20
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.19 2013/10/26 06:19:13 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.20 2013/10/27 13:33:44 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.
372# is set to a non-null value. 372# is set to a non-null value.
373# 373#
374# <local-id> specifies the local branch identifier that will be used to 374# <local-id> specifies the local branch identifier that will be used to
375# locally store the fetch result. It should be unique to multiple 375# locally store the fetch result. It should be unique to multiple
376# fetches within the repository that can be performed at the same time 376# fetches within the repository that can be performed at the same time
377# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT}. 377# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT%/*}.
378# This default should be fine unless you are fetching multiple trees 378# This default should be fine unless you are fetching multiple trees
379# from the same repository in the same ebuild. 379# from the same repository in the same ebuild.
380# 380#
381# The fetch operation will affect the EGIT_STORE only. It will not touch 381# The fetch operation will affect the EGIT_STORE only. It will not touch
382# the working copy, nor export any environment variables. 382# the working copy, nor export any environment variables.
396 repos=( ${EGIT_REPO_URI} ) 396 repos=( ${EGIT_REPO_URI} )
397 fi 397 fi
398 398
399 local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}} 399 local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
400 local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}} 400 local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
401 local local_id=${3:-${CATEGORY}/${PN}/${SLOT}} 401 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
402 local local_ref=refs/heads/${local_id}/__main__ 402 local local_ref=refs/heads/${local_id}/__main__
403 403
404 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset" 404 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
405 405
406 local -x GIT_DIR 406 local -x GIT_DIR
559 else 559 else
560 repos=( ${EGIT_REPO_URI} ) 560 repos=( ${EGIT_REPO_URI} )
561 fi 561 fi
562 562
563 local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}} 563 local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
564 local local_id=${3:-${CATEGORY}/${PN}/${SLOT}} 564 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
565 565
566 local -x GIT_DIR GIT_WORK_TREE 566 local -x GIT_DIR GIT_WORK_TREE
567 _git-r3_set_gitdir "${repos[0]}" 567 _git-r3_set_gitdir "${repos[0]}"
568 GIT_WORK_TREE=${out_dir} 568 GIT_WORK_TREE=${out_dir}
569 mkdir -p "${GIT_WORK_TREE}" || die 569 mkdir -p "${GIT_WORK_TREE}" || die

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20