diff options
author | Christian Faulhammer <fauli@gentoo.org> | 2009-09-24 07:19:41 +0000 |
---|---|---|
committer | Christian Faulhammer <fauli@gentoo.org> | 2009-09-24 07:19:41 +0000 |
commit | c9147f2d35bc62ce773e05b5aa9b229998c654d2 (patch) | |
tree | 7b6f9a6d73f621402f7c9c842ad4d75e704a7cf7 /eclass | |
parent | stable x86, security bug 283370 (diff) | |
download | gentoo-2-c9147f2d35bc62ce773e05b5aa9b229998c654d2.tar.gz gentoo-2-c9147f2d35bc62ce773e05b5aa9b229998c654d2.tar.bz2 gentoo-2-c9147f2d35bc62ce773e05b5aa9b229998c654d2.zip |
Add support for ESCM_OFFLINE variable, so users without internet connection can make use of it; patch provided by Jonathan Callen in bug 280211
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/bzr.eclass | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass index 1b3e5287aa44..7631cd3247b0 100644 --- a/eclass/bzr.eclass +++ b/eclass/bzr.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.3 2009/08/04 20:18:23 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.4 2009/09/24 07:19:41 fauli Exp $ # # @ECLASS: bzr.eclass # @MAINTAINER: @@ -114,6 +114,12 @@ EBZR_REVISION="${EBZR_REVISION:-}" # default: ${PN} EBZR_CACHE_DIR="${EBZR_CACHE_DIR:-${PN}}" +# @ECLASS-VARIABLE: EBZR_OFFLINE +# @DESCRIPTION: +# Set this variable to a non-empty value to disable the automatic updating of +# a bzr source tree. This is intended to be set outside the ebuild by users. +EBZR_OFFLINE="${EBZR_OFFLINE:-${ESCM_OFFLINE}}" + # @FUNCTION: bzr_initial_fetch # @DESCRIPTION: # Retrieves the source code from a repository for the first time, via @@ -136,14 +142,19 @@ bzr_initial_fetch() { bzr_update() { local repository="${1}"; - # update branch - einfo "bzr update start -->" - einfo " repository: ${repository}" - - pushd "${EBZR_BRANCH_DIR}" > /dev/null - ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \ - || die "${EBZR}: can't update from ${repository}." - popd > /dev/null + if [[ -n "${EBZR_OFFLINE"} ]]; then + einfo "skipping bzr update -->" + einfo " repository: ${repository}" + else + # update branch + einfo "bzr update start -->" + einfo " repository: ${repository}" + + pushd "${EBZR_BRANCH_DIR}" > /dev/null + ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \ + || die "${EBZR}: can't update from ${repository}." + popd > /dev/null + fi } |