/[gentoo-x86]/eclass/bzr.eclass
Gentoo

Diff of /eclass/bzr.eclass

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

Revision 1.4 Revision 1.16
1# Copyright 1999-2009 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/bzr.eclass,v 1.4 2009/09/24 07:19:41 fauli Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.16 2011/09/02 21:26:58 ulm Exp $
4# 4#
5# @ECLASS: bzr.eclass 5# @ECLASS: bzr.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Emacs team <emacs@gentoo.org>
8# Bazaar team <bazaar@gentoo.org>
9# @AUTHOR:
7# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>, 10# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
11# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>
8# Ulrich Mueller <ulm@gentoo.org>, 12# Ulrich MΓΌller <ulm@gentoo.org>
9# Christian Faulhammer <fauli@gentoo.org> 13# Christian Faulhammer <fauli@gentoo.org>
10# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>, 14# @BLURB: generic fetching functions for the Bazaar VCS
11# and anyone who wants to help
12# @BLURB: This eclass provides support to use the Bazaar DSCM
13# @DESCRIPTION: 15# @DESCRIPTION:
14# The bzr.eclass provides support for apps using the bazaar DSCM 16# The bzr.eclass provides functions to fetch, unpack, patch, and
15# (distributed source control management system). 17# bootstrap sources from repositories of the Bazaar distributed version
16# The eclass was originally derived from the git eclass. 18# control system. The eclass was originally derived from git.eclass.
17# 19#
18# Note: Just set EBZR_REPO_URI to the URI of the branch and the src_unpack() 20# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
19# of this eclass will put an export of the branch in ${WORKDIR}/${PN}. 21# of this eclass will export the branch to ${WORKDIR}/${P}.
20 22
21inherit eutils 23inherit eutils
22 24
23EBZR="bzr.eclass" 25EBZR="bzr.eclass"
24 26
28esac 30esac
29 31
30HOMEPAGE="http://bazaar-vcs.org/" 32HOMEPAGE="http://bazaar-vcs.org/"
31DESCRIPTION="Based on the ${EBZR} eclass" 33DESCRIPTION="Based on the ${EBZR} eclass"
32 34
33DEPEND=">=dev-util/bzr-1.5" 35DEPEND=">=dev-vcs/bzr-2.0.1"
36case "${EAPI:-0}" in
37 0|1) ;;
38 *) [[ ${EBZR_REPO_URI%%:*} = sftp ]] \
39 && DEPEND=">=dev-vcs/bzr-2.0.1[sftp]" ;;
40esac
34 41
35# @ECLASS-VARIABLE: EBZR_STORE_DIR 42# @ECLASS-VARIABLE: EBZR_STORE_DIR
36# @DESCRIPTION: 43# @DESCRIPTION:
37# The directory to store all fetched Bazaar live sources. 44# The directory to store all fetched Bazaar live sources.
38[[ -z ${EBZR_STORE_DIR} ]] && \
39 EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src" 45: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
46
47# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
48# @DESCRIPTION:
49# The Bazaar command to initialise a shared repository.
50: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
40 51
41# @ECLASS-VARIABLE: EBZR_FETCH_CMD 52# @ECLASS-VARIABLE: EBZR_FETCH_CMD
42# @DESCRIPTION: 53# @DESCRIPTION:
43# The Bazaar command to fetch the sources. 54# The Bazaar command to fetch the sources.
44EBZR_FETCH_CMD="bzr checkout --lightweight" 55: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
45 56
46# @ECLASS-VARIABLE: EBZR_UPDATE_CMD 57# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
47# @DESCRIPTION: 58# @DESCRIPTION:
48# The Bazaar command to update the sources. 59# The Bazaar command to update the sources.
49EBZR_UPDATE_CMD="bzr update" 60: ${EBZR_UPDATE_CMD:="bzr pull"}
50
51# @ECLASS-VARIABLE: EBZR_DIFF_CMD
52# @DESCRIPTION:
53# The Bazaar command to get the diff output.
54EBZR_DIFF_CMD="bzr diff"
55 61
56# @ECLASS-VARIABLE: EBZR_EXPORT_CMD 62# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
57# @DESCRIPTION: 63# @DESCRIPTION:
58# The Bazaar command to export a branch. 64# The Bazaar command to export a branch.
59EBZR_EXPORT_CMD="bzr export" 65: ${EBZR_EXPORT_CMD:="bzr export"}
60 66
61# @ECLASS-VARIABLE: EBZR_REVNO_CMD 67# @ECLASS-VARIABLE: EBZR_REVNO_CMD
62# @DESCRIPTION: 68# @DESCRIPTION:
63# The Bazaar command to list a revision number of the branch. 69# The Bazaar command to list a revision number of the branch.
64EBZR_REVNO_CMD="bzr revno" 70: ${EBZR_REVNO_CMD:="bzr revno"}
65 71
66# @ECLASS-VARIABLE: EBZR_OPTIONS 72# @ECLASS-VARIABLE: EBZR_OPTIONS
73# @DEFAULT_UNSET
67# @DESCRIPTION: 74# @DESCRIPTION:
68# The options passed to the fetch and update commands. 75# The options passed to the fetch and update commands.
69EBZR_OPTIONS="${EBZR_OPTIONS:-}"
70 76
71# @ECLASS-VARIABLE: EBZR_REPO_URI 77# @ECLASS-VARIABLE: EBZR_REPO_URI
78# @DEFAULT_UNSET
79# @REQUIRED
72# @DESCRIPTION: 80# @DESCRIPTION:
73# The repository URI for the source package. 81# The repository URI for the source package.
74# 82#
75# @CODE 83# Note: If the ebuild uses an sftp:// URI, then in EAPI 0 or 1 it must
76# Supported protocols: 84# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or
77# - http:// 85# later, the eclass will depend on dev-vcs/bzr[sftp].
78# - https:// 86
79# - sftp:// 87# @ECLASS-VARIABLE: EBZR_INITIAL_URI
80# - rsync:// 88# @DEFAULT_UNSET
81# - lp: 89# @DESCRIPTION:
82# @CODE 90# The URI used for initial branching of the source repository. If this
91# variable is set, the initial branch will be cloned from the location
92# specified, followed by a pull from ${EBZR_REPO_URI}. This is intended
93# for special cases, e.g. when download from the original repository is
94# slow, but a fast mirror exists but may be out of date.
83# 95#
84# Note: lp: seems to be an alias for https://launchpad.net 96# Normally, this variable needs not be set.
85EBZR_REPO_URI="${EBZR_REPO_URI:-}"
86 97
87# @ECLASS-VARIABLE: EBZR_BOOTSTRAP 98# @ECLASS-VARIABLE: EBZR_BOOTSTRAP
99# @DEFAULT_UNSET
88# @DESCRIPTION: 100# @DESCRIPTION:
89# Bootstrap script or command like autogen.sh or etc. 101# Bootstrap script or command like autogen.sh or etc.
90EBZR_BOOTSTRAP="${EBZR_BOOTSTRAP:-}"
91 102
92# @ECLASS-VARIABLE: EBZR_PATCHES 103# @ECLASS-VARIABLE: EBZR_PATCHES
104# @DEFAULT_UNSET
93# @DESCRIPTION: 105# @DESCRIPTION:
94# bzr eclass can apply patches in bzr_bootstrap(). 106# bzr.eclass can apply patches in bzr_bootstrap(). You can use regular
95# You can use regular expressions in this variable like *.diff or 107# expressions in this variable like *.diff or *.patch and the like.
96# *.patch and the like.
97# NOTE: These patches will bei applied before EBZR_BOOTSTRAP is processed. 108# Note: These patches will be applied before EBZR_BOOTSTRAP is processed.
98# 109#
99# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either 110# Patches are searched both in ${PWD} and ${FILESDIR}. If not found in
100# location, the installation dies. 111# either location, the installation dies.
101EBZR_PATCHES="${EBZR_PATCHES:-}" 112
113# @ECLASS-VARIABLE: EBZR_PROJECT
114# @DESCRIPTION:
115# The project name of your ebuild. Normally, the branch will be stored
116# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
117#
118# If EBZR_BRANCH is set (see below), then a shared repository will be
119# created in that directory, and the branch will be located in
120# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
121: ${EBZR_PROJECT:=${PN}}
122
123# @ECLASS-VARIABLE: EBZR_BRANCH
124# @DEFAULT_UNSET
125# @DESCRIPTION:
126# The directory where to store the branch within a shared repository,
127# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
128#
129# This variable should be set if there are several live ebuilds for
130# different branches of the same upstream project. The branches can
131# then share the same repository in EBZR_PROJECT, which will save both
132# data traffic volume and disk space.
133#
134# If there is only a live ebuild for one single branch, EBZR_BRANCH
135# needs not be set. In this case, the branch will be stored in a
136# stand-alone repository directly in EBZR_PROJECT.
102 137
103# @ECLASS-VARIABLE: EBZR_REVISION 138# @ECLASS-VARIABLE: EBZR_REVISION
139# @DEFAULT_UNSET
104# @DESCRIPTION: 140# @DESCRIPTION:
105# Revision to fetch, defaults to the latest (see 141# Revision to fetch, defaults to the latest
106# http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec) 142# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
107EBZR_REVISION="${EBZR_REVISION:-}"
108
109# @ECLASS-VARIABLE: EBZR_CACHE_DIR
110# @DESCRIPTION:
111# The directory to store the source for the package, relative to
112# EBZR_STORE_DIR.
113#
114# default: ${PN}
115EBZR_CACHE_DIR="${EBZR_CACHE_DIR:-${PN}}"
116 143
117# @ECLASS-VARIABLE: EBZR_OFFLINE 144# @ECLASS-VARIABLE: EBZR_OFFLINE
118# @DESCRIPTION: 145# @DESCRIPTION:
119# Set this variable to a non-empty value to disable the automatic updating of 146# Set this variable to a non-empty value to disable automatic updating
120# a bzr source tree. This is intended to be set outside the ebuild by users. 147# of a bzr source tree. This is intended to be set outside the ebuild
121EBZR_OFFLINE="${EBZR_OFFLINE:-${ESCM_OFFLINE}}" 148# by users.
149: ${EBZR_OFFLINE=${EVCS_OFFLINE}}
122 150
123# @FUNCTION: bzr_initial_fetch 151# @FUNCTION: bzr_initial_fetch
152# @USAGE: <repository URI> <branch directory>
124# @DESCRIPTION: 153# @DESCRIPTION:
125# Retrieves the source code from a repository for the first time, via 154# Internal function, retrieves the source code from a repository for the
126# ${EBZR_FETCH_CMD}. 155# first time, using ${EBZR_FETCH_CMD}.
127bzr_initial_fetch() { 156bzr_initial_fetch() {
128 local repository="${1}"; 157 local repo_uri=$1 branch_dir=$2
129 local branch_dir="${2}"; 158
159 if [[ -n "${EBZR_OFFLINE}" ]]; then
160 ewarn "EBZR_OFFLINE cannot be used when there is no local branch yet."
161 fi
130 162
131 # fetch branch 163 # fetch branch
132 einfo "bzr fetch start -->" 164 einfo "bzr branch start -->"
133 einfo " repository: ${repository} => ${branch_dir}" 165 einfo " repository: ${repo_uri} => ${branch_dir}"
134 166
135 ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repository}" "${branch_dir}" \ 167 ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repo_uri}" "${branch_dir}" \
136 || die "${EBZR}: can't branch from ${repository}." 168 || die "${EBZR}: can't branch from ${repo_uri}"
137} 169}
138 170
139# @FUNCTION: bzr_update 171# @FUNCTION: bzr_update
172# @USAGE: <repository URI> <branch directory>
140# @DESCRIPTION: 173# @DESCRIPTION:
141# Updates the source code from a repository, via ${EBZR_UPDATE_CMD}. 174# Internal function, updates the source code from a repository, using
175# ${EBZR_UPDATE_CMD}.
142bzr_update() { 176bzr_update() {
143 local repository="${1}"; 177 local repo_uri=$1 branch_dir=$2
144 178
145 if [[ -n "${EBZR_OFFLINE"} ]]; then 179 if [[ -n "${EBZR_OFFLINE}" ]]; then
146 einfo "skipping bzr update -->" 180 einfo "skipping bzr pull -->"
147 einfo " repository: ${repository}" 181 einfo " repository: ${repo_uri}"
148 else 182 else
149 # update branch 183 # update branch
150 einfo "bzr update start -->" 184 einfo "bzr pull start -->"
151 einfo " repository: ${repository}" 185 einfo " repository: ${repo_uri}"
152 186
153 pushd "${EBZR_BRANCH_DIR}" > /dev/null 187 pushd "${branch_dir}" > /dev/null \
188 || die "${EBZR}: can't chdir to ${branch_dir}"
154 ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \ 189 ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} "${repo_uri}" \
155 || die "${EBZR}: can't update from ${repository}." 190 || die "${EBZR}: can't pull from ${repo_uri}"
156 popd > /dev/null 191 popd > /dev/null
157 fi 192 fi
158} 193}
159 194
160
161# @FUNCTION: bzr_fetch 195# @FUNCTION: bzr_fetch
162# @DESCRIPTION: 196# @DESCRIPTION:
163# Wrapper function to fetch sources from a Bazaar repository via bzr 197# Wrapper function to fetch sources from a Bazaar repository with
164# fetch or bzr update, depending on whether there is an existing 198# bzr branch or bzr pull, depending on whether there is an existing
165# working copy in ${EBZR_BRANCH_DIR}. 199# working copy.
166bzr_fetch() { 200bzr_fetch() {
167 local EBZR_BRANCH_DIR 201 local repo_dir branch_dir
168 202
169 # EBZR_REPO_URI is empty.
170 [[ ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty." 203 [[ -n ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty"
171
172 # check for the protocol or pull from a local repo.
173 if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
174 case ${EBZR_REPO_URI%%:*} in
175 # lp: seems to be an alias to https://launchpad.net
176 http|https|rsync|lp)
177 ;;
178 sftp)
179 if ! built_with_use --missing true dev-util/bzr sftp; then
180 eerror "To fetch sources from ${EBZR_REPO_URI} you need SFTP"
181 eerror "support in dev-util/bzr."
182 die "Please, rebuild dev-util/bzr with the sftp USE flag enabled."
183 fi
184 ;;
185 *)
186 die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
187 ;;
188 esac
189 fi
190 204
191 if [[ ! -d ${EBZR_STORE_DIR} ]] ; then 205 if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
192 debug-print "${FUNCNAME}: initial branch. Creating bzr directory" 206 local save_sandbox_write=${SANDBOX_WRITE}
193 addwrite / 207 addwrite /
194 mkdir -p "${EBZR_STORE_DIR}" \ 208 mkdir -p "${EBZR_STORE_DIR}" \
195 || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}." 209 || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}"
196 export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}" 210 SANDBOX_WRITE=${save_sandbox_write}
197 fi 211 fi
198 212
199 pushd "${EBZR_STORE_DIR}" > /dev/null || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}" 213 pushd "${EBZR_STORE_DIR}" > /dev/null \
214 || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
200 215
201 EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}" 216 repo_dir=${EBZR_STORE_DIR}/${EBZR_PROJECT}
217 branch_dir=${repo_dir}${EBZR_BRANCH:+/${EBZR_BRANCH}}
202 218
203 addwrite "${EBZR_STORE_DIR}" 219 addwrite "${EBZR_STORE_DIR}"
204 addwrite "${EBZR_BRANCH_DIR}"
205 220
206 debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}" 221 # Clean up if the existing local copy is a checkout (as was the case
207
208 # Run bzr_initial_fetch() only if the branch has not been pulled
209 # before or if the existing local copy is a full checkout (as did
210 # an older version of bzr.eclass) 222 # with an older version of bzr.eclass).
211 if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then 223 # This test can be removed after 1 Mar 2012.
224 if [[ ${EBZR_FETCH_CMD} != *checkout* && -d ${repo_dir}/.bzr/checkout ]]
225 then
226 local tmpname=$(mktemp -u "${repo_dir}._old_.XXXXXX")
227 ewarn "checkout from old version of ${EBZR} found, moving it to:"
228 ewarn "${tmpname}"
229 ewarn "you may manually remove it"
230 mv "${repo_dir}" "${tmpname}" \
231 || die "${EBZR}: can't move old checkout out of the way"
232 fi
233
234 if [[ ! -d ${branch_dir}/.bzr ]]; then
235 if [[ ${repo_dir} != "${branch_dir}" && ! -d ${repo_dir}/.bzr ]]; then
236 einfo "creating shared bzr repository"
237 ${EBZR_INIT_REPO_CMD} "${repo_dir}" \
238 || die "${EBZR}: can't create shared repository"
239 fi
240
241 if [[ -z ${EBZR_INITIAL_URI} ]]; then
212 bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" 242 bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
213 elif [[ -d "${EBZR_BRANCH_DIR}"/.bzr/repository/ ]]; then 243 else
214 einfo "Re-fetching the branch to save space..." 244 # Workaround for faster initial download. This clones the
215 rm -rf "${EBZR_BRANCH_DIR}" 245 # branch from a fast server (which may be out of date), and
216 bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" 246 # subsequently pulls from the slow original repository.
247 bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
248 if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
249 EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
250 EBZR_OFFLINE="" \
251 bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
252 fi
253 fi
217 else 254 else
218 bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" 255 bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
219 fi 256 fi
220 257
221 cd "${EBZR_BRANCH_DIR}" 258 cd "${branch_dir}" || die "${EBZR}: can't chdir to ${branch_dir}"
259
260 # Save revision number in environment. #311101
261 export EBZR_REVNO=$(${EBZR_REVNO_CMD})
222 262
223 einfo "exporting ..." 263 einfo "exporting ..."
224 ${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} "${WORKDIR}/${P}" \ 264 ${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
225 || die "${EBZR}: export failed" 265 "${WORKDIR}/${P}" . || die "${EBZR}: export failed"
226 266 einfo "revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${WORKDIR}/${P}"
227 local revision
228 if [[ -n "${EBZR_REVISION}" ]]; then
229 revision="${EBZR_REVISION}"
230 else
231 revision=$(${EBZR_REVNO_CMD} "${EBZR_BRANCH_DIR}")
232 fi
233
234 einfo "Revision ${revision} is now in ${WORKDIR}/${P}"
235 267
236 popd > /dev/null 268 popd > /dev/null
237} 269}
238 270
239# @FUNCTION: bzr_bootstrap 271# @FUNCTION: bzr_bootstrap
240# @DESCRIPTION: 272# @DESCRIPTION:
241# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified. 273# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified.
242bzr_bootstrap() { 274bzr_bootstrap() {
243 local patch lpatch 275 local patch lpatch
244 276
245 pushd "${S}" > /dev/null 277 pushd "${S}" > /dev/null || die "${EBZR}: can't chdir to ${S}"
246 278
247 if [[ -n ${EBZR_PATCHES} ]] ; then 279 if [[ -n ${EBZR_PATCHES} ]] ; then
248 einfo "apply patches -->" 280 einfo "apply patches -->"
249 281
250 for patch in ${EBZR_PATCHES} ; do 282 for patch in ${EBZR_PATCHES} ; do
268 einfo "begin bootstrap -->" 300 einfo "begin bootstrap -->"
269 301
270 if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then 302 if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then
271 einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}" 303 einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}"
272 "./${EBZR_BOOTSTRAP}" \ 304 "./${EBZR_BOOTSTRAP}" \
273 || die "${EBZR}: can't execute EBZR_BOOTSTRAP." 305 || die "${EBZR}: can't execute EBZR_BOOTSTRAP"
274 else 306 else
275 einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}" 307 einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}"
276 "${EBZR_BOOTSTRAP}" \ 308 "${EBZR_BOOTSTRAP}" \
277 || die "${EBZR}: can't eval EBZR_BOOTSTRAP." 309 || die "${EBZR}: can't eval EBZR_BOOTSTRAP"
278 fi 310 fi
279 fi 311 fi
280 312
281 popd > /dev/null 313 popd > /dev/null
282} 314}
283 315
284# @FUNCTION: bzr_src_unpack 316# @FUNCTION: bzr_src_unpack
285# @DESCRIPTION: 317# @DESCRIPTION:
286# Default src_unpack(). Includes bzr_fetch() and bootstrap(). 318# Default src_unpack(), calls bzr_fetch. For EAPIs 0 and 1, also calls
319# bzr_src_prepare.
287bzr_src_unpack() { 320bzr_src_unpack() {
288 if ! [ -z ${EBZR_BRANCH} ]; then 321 bzr_fetch
289 # This test will go away on 01 Jul 2010
290 eerror "This ebuild uses EBZR_BRANCH which is not supported anymore"
291 eerror "by the bzr.eclass. Please report this to the ebuild's maintainer."
292 die "EBZR_BRANCH still defined"
293 fi
294 bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
295 case "${EAPI:-0}" in 322 case "${EAPI:-0}" in
296 0|1) bzr_src_prepare ;; 323 0|1) bzr_src_prepare ;;
297 esac 324 esac
298} 325}
299 326
300# @FUNCTION: bzr_src_prepare 327# @FUNCTION: bzr_src_prepare
301# @DESCRIPTION: 328# @DESCRIPTION:
302# Default src_prepare(). Executes bzr_bootstrap() for patch 329# Default src_prepare(), calls bzr_bootstrap.
303# application and Make file generation (if needed).
304bzr_src_prepare() { 330bzr_src_prepare() {
305 bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()." 331 bzr_bootstrap
306} 332}

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

  ViewVC Help
Powered by ViewVC 1.1.20