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

Diff of /eclass/bzr.eclass

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

Revision 1.8 Revision 1.10
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.8 2010/03/05 09:35:23 fauli Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.10 2010/11/07 22:44:35 fauli 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 Mueller <ulm@gentoo.org>, 8# Ulrich Mueller <ulm@gentoo.org>,
210 # Run bzr_initial_fetch() only if the branch has not been pulled 210 # Run bzr_initial_fetch() only if the branch has not been pulled
211 # before or if the existing local copy is a full checkout (as did 211 # before or if the existing local copy is a full checkout (as did
212 # an older version of bzr.eclass) 212 # an older version of bzr.eclass)
213 if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then 213 if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
214 bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" 214 bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
215 elif [[ ${EBZR_FETCH_CMD} == *lightweight* \
216 && -d ${EBZR_BRANCH_DIR}/.bzr/repository ]]; then
217 einfo "Re-fetching the branch to save space..."
218 rm -rf "${EBZR_BRANCH_DIR}"
219 bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
220 else 215 else
221 bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" 216 bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
222 fi 217 fi
223 218
224 cd "${EBZR_BRANCH_DIR}" 219 cd "${EBZR_BRANCH_DIR}"
233 [[ -z ${EBZR_OFFLINE} || -d ${EBZR_BRANCH_DIR}/.bzr/repository ]] \ 228 [[ -z ${EBZR_OFFLINE} || -d ${EBZR_BRANCH_DIR}/.bzr/repository ]] \
234 || die "${EBZR}: No support for revisions when off-line" 229 || die "${EBZR}: No support for revisions when off-line"
235 ${EBZR_EXPORT_CMD} -r "${EBZR_REVISION}" "${WORKDIR}/${P}" \ 230 ${EBZR_EXPORT_CMD} -r "${EBZR_REVISION}" "${WORKDIR}/${P}" \
236 || die "${EBZR}: export failed" 231 || die "${EBZR}: export failed"
237 fi 232 fi
233
234 export EBZR_TREE_CRC32=$(awk '$1 == "crc32:" { print $2; exit }' \
235 .bzr/checkout/dirstate)
238 236
239 popd > /dev/null 237 popd > /dev/null
240} 238}
241 239
242# @FUNCTION: bzr_bootstrap 240# @FUNCTION: bzr_bootstrap

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20