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

Diff of /eclass/git-2.eclass

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

Revision 1.14 Revision 1.15
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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-2.eclass,v 1.14 2011/08/22 04:46:31 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.15 2011/09/23 13:55:47 mgorny Exp $
4 4
5# @ECLASS: git-2.eclass 5# @ECLASS: git-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Donnie Berkholz <dberkholz@gentoo.org> 7# Donnie Berkholz <dberkholz@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
125# We define it in function scope so user can define 125# We define it in function scope so user can define
126# all the variables before and after inherit. 126# all the variables before and after inherit.
127git-2_init_variables() { 127git-2_init_variables() {
128 debug-print-function ${FUNCNAME} "$@" 128 debug-print-function ${FUNCNAME} "$@"
129 129
130 local x 130 local esc_pn liverepo livebranch livecommit
131 esc_pn=${PN//[-+]/_}
131 132
132 : ${EGIT_SOURCEDIR="${S}"} 133 : ${EGIT_SOURCEDIR="${S}"}
133 134
134 : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"} 135 : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
135 136
137 138
138 : ${EGIT_OPTIONS:=} 139 : ${EGIT_OPTIONS:=}
139 140
140 : ${EGIT_MASTER:=master} 141 : ${EGIT_MASTER:=master}
141 142
142 eval x="\$${PN//[-+]/_}_LIVE_REPO" 143 liverepo=${esc_pn}_LIVE_REPO
143 EGIT_REPO_URI=${x:-${EGIT_REPO_URI}} 144 EGIT_REPO_URI=${!liverepo:-${EGIT_REPO_URI}}
144 [[ -z ${EGIT_REPO_URI} ]] && die "EGIT_REPO_URI must have some value" 145 [[ -z ${EGIT_REPO_URI} ]] && die "EGIT_REPO_URI must have some value"
145 146
146 : ${EVCS_OFFLINE:=} 147 : ${EVCS_OFFLINE:=}
147 148
148 eval x="\$${PN//[-+]/_}_LIVE_BRANCH" 149 livebranch=${esc_pn}_LIVE_BRANCH
149 [[ -n ${x} ]] && ewarn "QA: using \"${PN//[-+]/_}_LIVE_BRANCH\" variable, you won't get any support" 150 [[ -n ${!livebranch} ]] && ewarn "QA: using \"${esc_pn}_LIVE_BRANCH\" variable, you won't get any support"
150 EGIT_BRANCH=${x:-${EGIT_BRANCH:-${EGIT_MASTER}}} 151 EGIT_BRANCH=${!livebranch:-${EGIT_BRANCH:-${EGIT_MASTER}}}
151 152
152 eval x="\$${PN//[-+]/_}_LIVE_COMMIT" 153 livecommit=${esc_pn}_LIVE_COMMIT
153 [[ -n ${x} ]] && ewarn "QA: using \"${PN//[-+]/_}_LIVE_COMMIT\" variable, you won't get any support" 154 [[ -n ${!livecommit} ]] && ewarn "QA: using \"${esc_pn}_LIVE_COMMIT\" variable, you won't get any support"
154 EGIT_COMMIT=${x:-${EGIT_COMMIT:-${EGIT_BRANCH}}} 155 EGIT_COMMIT=${!livecommit:-${EGIT_COMMIT:-${EGIT_BRANCH}}}
155 156
156 : ${EGIT_REPACK:=} 157 : ${EGIT_REPACK:=}
157 158
158 : ${EGIT_PRUNE:=} 159 : ${EGIT_PRUNE:=}
159} 160}

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20