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

Diff of /eclass/bzr.eclass

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

Revision 1.11 Revision 1.12
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/bzr.eclass,v 1.11 2011/02/10 20:08:59 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.12 2011/02/19 14:43:57 ulm Exp $
4# 4#
5# @ECLASS: bzr.eclass 5# @ECLASS: bzr.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>, 7# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
8# Ulrich Müller <ulm@gentoo.org>, 8# Ulrich Müller <ulm@gentoo.org>,
80# 80#
81# Note: If the ebuild uses an sftp:// URI, then in EAPI 0 or 1 it must 81# Note: If the ebuild uses an sftp:// URI, then in EAPI 0 or 1 it must
82# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or 82# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or
83# later, the eclass will depend on dev-vcs/bzr[sftp]. 83# later, the eclass will depend on dev-vcs/bzr[sftp].
84 84
85# @ECLASS-VARIABLE: EBZR_MIRROR_URI 85# @ECLASS-VARIABLE: EBZR_INITIAL_URI
86# @DEFAULT_UNSET 86# @DEFAULT_UNSET
87# @DESCRIPTION: 87# @DESCRIPTION:
88# The URI of a fast mirror of the source repository. If this variable 88# The URI used for initial branching of the source repository. If this
89# is set, the initial branch will be cloned from the mirror, followed 89# variable is set, the initial branch will be cloned from the location
90# by a pull from the original repository. This is intended for special 90# specified, followed by a pull from ${EBZR_REPO_URI}. This is intended
91# cases, where download from the original repository is slow, but a fast 91# for special cases, e.g. when download from the original repository is
92# mirror exists but may be out of date. 92# slow, but a fast mirror exists but may be out of date.
93# 93#
94# Normally, this variable needs not be set. 94# Normally, this variable needs not be set.
95 95
96# @ECLASS-VARIABLE: EBZR_BOOTSTRAP 96# @ECLASS-VARIABLE: EBZR_BOOTSTRAP
97# @DEFAULT_UNSET 97# @DEFAULT_UNSET
234 einfo "creating shared bzr repository" 234 einfo "creating shared bzr repository"
235 ${EBZR_INIT_REPO_CMD} "${repo_dir}" \ 235 ${EBZR_INIT_REPO_CMD} "${repo_dir}" \
236 || die "${EBZR}: can't create shared repository" 236 || die "${EBZR}: can't create shared repository"
237 fi 237 fi
238 238
239 if [[ -z ${EBZR_MIRROR_URI} ]]; then 239 if [[ -z ${EBZR_INITIAL_URI} ]]; then
240 bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}" 240 bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
241 else 241 else
242 # Workaround for faster initial download. This clones the 242 # Workaround for faster initial download. This clones the
243 # branch from a fast mirror (which may be out of date), and 243 # branch from a fast server (which may be out of date), and
244 # subsequently pulls from the slow original repository. 244 # subsequently pulls from the slow original repository.
245 bzr_initial_fetch "${EBZR_MIRROR_URI}" "${branch_dir}" 245 bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
246 if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
246 EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \ 247 EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
248 EBZR_OFFLINE="" \
247 EBZR_OFFLINE="" bzr_update "${EBZR_REPO_URI}" "${branch_dir}" 249 bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
250 fi
248 fi 251 fi
249 else 252 else
250 bzr_update "${EBZR_REPO_URI}" "${branch_dir}" 253 bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
251 fi 254 fi
252 255

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20