/[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.30 Revision 1.31
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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.30 2014/03/02 11:46:42 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.31 2014/03/02 11:47:10 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.
30 30
31if [[ ! ${_INHERITED_BY_GIT_2} ]]; then 31if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
32 DEPEND="dev-vcs/git" 32 DEPEND="dev-vcs/git"
33fi 33fi
34 34
35# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
36# @DESCRIPTION:
37# Type of clone that should be used against the remote repository.
38# This can be either of: 'mirror'.
39#
40# The 'mirror' type clones all remote branches and tags with complete
41# history and all notes. EGIT_COMMIT can specify any commit hash.
42# Upstream-removed branches and tags are purged from the local clone
43# while fetching. This mode is suitable for cloning the local copy
44# for development or hosting a local git mirror. However, clones
45# of repositories with large diverged branches may quickly grow large.
46: ${EGIT_CLONE_TYPE:=mirror}
47
35# @ECLASS-VARIABLE: EGIT3_STORE_DIR 48# @ECLASS-VARIABLE: EGIT3_STORE_DIR
36# @DESCRIPTION: 49# @DESCRIPTION:
37# Storage directory for git sources. 50# Storage directory for git sources.
38# 51#
39# This is intended to be set by user in make.conf. Ebuilds must not set 52# This is intended to be set by user in make.conf. Ebuilds must not set
104# @DESCRIPTION: 117# @DESCRIPTION:
105# Set the eclass variables as necessary for operation. This can involve 118# Set the eclass variables as necessary for operation. This can involve
106# setting EGIT_* to defaults or ${PN}_LIVE_* variables. 119# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
107_git-r3_env_setup() { 120_git-r3_env_setup() {
108 debug-print-function ${FUNCNAME} "$@" 121 debug-print-function ${FUNCNAME} "$@"
122
123 # check the clone type
124 case "${EGIT_CLONE_TYPE}" in
125 mirror)
126 ;;
127 *)
128 die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
129 esac
109 130
110 local esc_pn livevar 131 local esc_pn livevar
111 esc_pn=${PN//[-+]/_} 132 esc_pn=${PN//[-+]/_}
112 133
113 livevar=${esc_pn}_LIVE_REPO 134 livevar=${esc_pn}_LIVE_REPO

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20