* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2008-10-25 12:17 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-10-25 12:17 UTC (permalink / raw
To: gentoo-commits
ulm 08/10/25 12:17:23
Added: bzr.eclass
Log:
Initial import.
Revision Changes Path
1.1 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.1&content-type=text/plain
Index: bzr.eclass
===================================================================
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.1 2008/10/25 12:17:23 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
# Ulrich Mueller <ulm@gentoo.org>,
# and anyone who wants to help
# @BLURB: This eclass provides support to use the Bazaar DSCM
# @DESCRIPTION:
# The bzr.eclass provides support for apps using the bazaar DSCM
# (distributed source control management system).
# The eclass was originally derived from the git eclass.
#
# Note: Just set EBZR_REPO_URI to the url of the branch and the src_unpack
# this eclass provides will put an export of the branch in ${WORKDIR}/${PN}.
inherit eutils
EBZR="bzr.eclass"
EXPORT_FUNCTIONS src_unpack
HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${EBZR} eclass"
DEPEND=">=dev-util/bzr-1.5"
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
# The dir to store the bzr sources.
EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
# The bzr command to fetch the sources.
EBZR_FETCH_CMD="bzr branch"
# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
# @DESCRIPTION:
# The bzr command to update the sources.
EBZR_UPDATE_CMD="bzr pull"
# @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD
# @DESCRIPTION:
# The bzr command to get the diffstat output.
EBZR_DIFFSTAT_CMD="bzr diff"
# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
# @DESCRIPTION:
# The bzr command to export a branch.
EBZR_EXPORT_CMD="bzr export"
# @ECLASS-VARIABLE: EBZR_REVNO_CMD
# @DESCRIPTION:
# The bzr command to list revision number of the branch.
EBZR_REVNO_CMD="bzr revno"
# @ECLASS-VARIABLE: EBZR_OPTIONS
# @DESCRIPTION:
# The options passed to the fetch and update commands.
EBZR_OPTIONS="${EBZR_OPTIONS:-}"
# @ECLASS-VARIABLE: EBZR_REPO_URI
# @DESCRIPTION:
# The repository uri for the source package.
#
# @CODE
# Supported protocols:
# - http://
# - https://
# - sftp://
# - rsync://
# - lp://
# @CODE
#
# Note: lp = https://launchpad.net
EBZR_REPO_URI="${EBZR_REPO_URI:-}"
# @ECLASS-VARIABLE: EBZR_BOOTSTRAP
# @DESCRIPTION:
# Bootstrap script or command like autogen.sh or etc.
EBZR_BOOTSTRAP="${EBZR_BOOTSTRAP:-}"
# @ECLASS-VARIABLE: EBZR_PATCHES
# @DESCRIPTION:
# bzr eclass can apply patches in bzr_bootstrap().
# you can use regexp in this valiable like *.diff or *.patch or etc.
# NOTE: this patches will applied before EBZR_BOOTSTRAP is processed.
#
# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
# location, the installation dies.
EBZR_PATCHES="${EBZR_PATCHES:-}"
# @ECLASS-VARIABLE: EBZR_BRANCH
# @DESCRIPTION:
# The branch to fetch in bzr_fetch().
#
# default: trunk
EBZR_BRANCH="${EBZR_BRANCH:-trunk}"
# @ECLASS-VARIABLE: EBZR_REVISION
# @DESCRIPTION:
# Revision to get, if not latest (see http://bazaar-vcs.org/BzrRevisionSpec)
EBZR_REVISION="${EBZR_REVISION:-}"
# @ECLASS-VARIABLE: EBZR_CACHE_DIR
# @DESCRIPTION:
# The dir to store the source for the package, relative to EBZR_STORE_DIR.
#
# default: ${PN}
EBZR_CACHE_DIR="${EBZR_CACHE_DIR:-${PN}}"
# @FUNCTION: bzr_fetch
# @DESCRIPTION:
# Wrapper function to fetch sources from bazaar via bzr fetch or bzr update,
# depending on whether there is an existing working copy in ${EBZR_BRANCH_DIR}.
bzr_fetch() {
local EBZR_BRANCH_DIR
# EBZR_REPO_URI is empty.
[[ ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty."
# check for the protocol or pull from a local repo.
if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
case ${EBZR_REPO_URI%%:*} in
# lp:// is https://launchpad.net
http|https|rsync|sftp|lp)
;;
*)
die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
;;
esac
fi
if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
debug-print "${FUNCNAME}: initial branch. creating bzr directory"
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
fi
cd -P "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"
addwrite "${EBZR_STORE_DIR}"
addwrite "${EBZR_BRANCH_DIR}"
debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}"
local repository
if [[ ${EBZR_REPO_URI} == */* ]]; then
repository="${EBZR_REPO_URI}${EBZR_BRANCH}"
else
repository="${EBZR_REPO_URI}"
fi
if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
# fetch branch
einfo "bzr branch start -->"
einfo " repository: ${repository} => ${EBZR_BRANCH_DIR}"
${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repository}" "${EBZR_BRANCH_DIR}" \
|| die "${EBZR}: can't branch from ${repository}."
else
# update branch
einfo "bzr pull start -->"
einfo " repository: ${repository}"
cd "${EBZR_BRANCH_DIR}"
${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} "${repository}" \
|| die "${EBZR}: can't merge from ${repository}."
${EBZR_DIFFSTAT_CMD}
fi
cd "${EBZR_BRANCH_DIR}"
einfo "exporting ..."
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} "${WORKDIR}/${P}" \
|| die "${EBZR}: export failed"
local revision
if [[ -n "${EBZR_REVISION}" ]]; then
revision="${EBZR_REVISION}"
else
revision=$(${EBZR_REVNO_CMD} "${EBZR_BRANCH_DIR}")
fi
einfo "Revision ${revision} is now in ${WORKDIR}/${P}"
cd "${WORKDIR}"
}
# @FUNCTION: bzr_bootstrap
# @DESCRIPTION:
# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified
bzr_bootstrap() {
local patch lpatch
cd "${S}"
if [[ -n ${EBZR_PATCHES} ]] ; then
einfo "apply patches -->"
for patch in ${EBZR_PATCHES} ; do
if [[ -f ${patch} ]] ; then
epatch ${patch}
else
for lpatch in "${FILESDIR}"/${patch} ; do
if [[ -f ${lpatch} ]] ; then
epatch ${lpatch}
else
die "${EBZR}: ${patch} is not found"
fi
done
fi
done
fi
if [[ -n ${EBZR_BOOTSTRAP} ]] ; then
einfo "begin bootstrap -->"
if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then
einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}"
"./${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't execute EBZR_BOOTSTRAP."
else
einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}"
"${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't eval EBZR_BOOTSTRAP."
fi
fi
}
# @FUNCTION: bzr_src_unpack
# @DESCRIPTION:
# default src_unpack. fetch and bootstrap.
bzr_src_unpack() {
bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()."
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-07-08 9:47 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-07-08 9:47 UTC (permalink / raw
To: gentoo-commits
fauli 09/07/08 09:47:38
Modified: bzr.eclass
Log:
Import bzr.eclass from Bazaar overlay:
* Make it EAPI aware
* Use lightweight checkout to save disk space, including migration path for previously fetched sources
* Support sftp repositories
* Do some code clean up
* Rework documentation
Revision Changes Path
1.2 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.1&r2=1.2
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bzr.eclass 25 Oct 2008 12:17:23 -0000 1.1
+++ bzr.eclass 8 Jul 2009 09:47:38 -0000 1.2
@@ -1,11 +1,13 @@
-# Copyright 1999-2008 Gentoo Foundation
+# 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.1 2008/10/25 12:17:23 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.2 2009/07/08 09:47:38 fauli Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
# Ulrich Mueller <ulm@gentoo.org>,
+# Christian Faulhammer <fauli@gentoo.org>
+# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>,
# and anyone who wants to help
# @BLURB: This eclass provides support to use the Bazaar DSCM
# @DESCRIPTION:
@@ -13,14 +15,17 @@
# (distributed source control management system).
# The eclass was originally derived from the git eclass.
#
-# Note: Just set EBZR_REPO_URI to the url of the branch and the src_unpack
-# this eclass provides will put an export of the branch in ${WORKDIR}/${PN}.
+# Note: Just set EBZR_REPO_URI to the URI of the branch and the src_unpack()
+# of this eclass will put an export of the branch in ${WORKDIR}/${PN}.
inherit eutils
EBZR="bzr.eclass"
-EXPORT_FUNCTIONS src_unpack
+case "${EAPI:-0}" in
+ 0|1) EXPORT_FUNCTIONS src_unpack ;;
+ *) EXPORT_FUNCTIONS src_unpack src_prepare ;;
+esac
HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${EBZR} eclass"
@@ -29,32 +34,32 @@
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
-# The dir to store the bzr sources.
+# The directory to store all fetched Bazaar live sources.
EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
-# The bzr command to fetch the sources.
-EBZR_FETCH_CMD="bzr branch"
+# The Bazaar command to fetch the sources.
+EBZR_FETCH_CMD="bzr checkout --lightweight"
# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
# @DESCRIPTION:
-# The bzr command to update the sources.
-EBZR_UPDATE_CMD="bzr pull"
+# The Bazaar command to update the sources.
+EBZR_UPDATE_CMD="bzr update"
-# @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD
+# @ECLASS-VARIABLE: EBZR_DIFF_CMD
# @DESCRIPTION:
-# The bzr command to get the diffstat output.
-EBZR_DIFFSTAT_CMD="bzr diff"
+# The Bazaar command to get the diff output.
+EBZR_DIFF_CMD="bzr diff"
# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
# @DESCRIPTION:
-# The bzr command to export a branch.
+# The Bazaar command to export a branch.
EBZR_EXPORT_CMD="bzr export"
# @ECLASS-VARIABLE: EBZR_REVNO_CMD
# @DESCRIPTION:
-# The bzr command to list revision number of the branch.
+# The Bazaar command to list a revision number of the branch.
EBZR_REVNO_CMD="bzr revno"
# @ECLASS-VARIABLE: EBZR_OPTIONS
@@ -64,7 +69,7 @@
# @ECLASS-VARIABLE: EBZR_REPO_URI
# @DESCRIPTION:
-# The repository uri for the source package.
+# The repository URI for the source package.
#
# @CODE
# Supported protocols:
@@ -72,10 +77,10 @@
# - https://
# - sftp://
# - rsync://
-# - lp://
+# - lp:
# @CODE
#
-# Note: lp = https://launchpad.net
+# Note: lp: seems to be an alias for https://launchpad.net
EBZR_REPO_URI="${EBZR_REPO_URI:-}"
# @ECLASS-VARIABLE: EBZR_BOOTSTRAP
@@ -86,36 +91,66 @@
# @ECLASS-VARIABLE: EBZR_PATCHES
# @DESCRIPTION:
# bzr eclass can apply patches in bzr_bootstrap().
-# you can use regexp in this valiable like *.diff or *.patch or etc.
-# NOTE: this patches will applied before EBZR_BOOTSTRAP is processed.
+# You can use regular expressions in this variable like *.diff or
+# *.patch and the like.
+# NOTE: These patches will bei applied before EBZR_BOOTSTRAP is processed.
#
# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
# location, the installation dies.
EBZR_PATCHES="${EBZR_PATCHES:-}"
-# @ECLASS-VARIABLE: EBZR_BRANCH
-# @DESCRIPTION:
-# The branch to fetch in bzr_fetch().
-#
-# default: trunk
-EBZR_BRANCH="${EBZR_BRANCH:-trunk}"
-
# @ECLASS-VARIABLE: EBZR_REVISION
# @DESCRIPTION:
-# Revision to get, if not latest (see http://bazaar-vcs.org/BzrRevisionSpec)
+# Revision to fetch, defaults to the latest (see
+# http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec)
EBZR_REVISION="${EBZR_REVISION:-}"
# @ECLASS-VARIABLE: EBZR_CACHE_DIR
# @DESCRIPTION:
-# The dir to store the source for the package, relative to EBZR_STORE_DIR.
+# The directory to store the source for the package, relative to
+# EBZR_STORE_DIR.
#
# default: ${PN}
EBZR_CACHE_DIR="${EBZR_CACHE_DIR:-${PN}}"
+# @FUNCTION: bzr_initial_fetch
+# @DESCRIPTION:
+# Retrieves the source code from a repository for the first time, via
+# ${EBZR_FETCH_CMD}.
+bzr_initial_fetch() {
+ local repository="${1}";
+ local branch_dir="${2}";
+
+ # fetch branch
+ einfo "bzr fetch start -->"
+ einfo " repository: ${repository} => ${branch_dir}"
+
+ ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repository}" "${branch_dir}" \
+ || die "${EBZR}: can't branch from ${repository}."
+}
+
+# @FUNCTION: bzr_update
+# @DESCRIPTION:
+# Updates the source code from a repository, via ${EBZR_UPDATE_CMD}.
+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
+}
+
+
# @FUNCTION: bzr_fetch
# @DESCRIPTION:
-# Wrapper function to fetch sources from bazaar via bzr fetch or bzr update,
-# depending on whether there is an existing working copy in ${EBZR_BRANCH_DIR}.
+# Wrapper function to fetch sources from a Bazaar repository via bzr
+# fetch or bzr update, depending on whether there is an existing
+# working copy in ${EBZR_BRANCH_DIR}.
bzr_fetch() {
local EBZR_BRANCH_DIR
@@ -125,8 +160,15 @@
# check for the protocol or pull from a local repo.
if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
case ${EBZR_REPO_URI%%:*} in
- # lp:// is https://launchpad.net
- http|https|rsync|sftp|lp)
+ # lp: seems to be an alias to https://launchpad.net
+ http|https|rsync|lp)
+ ;;
+ sftp)
+ if ! built_with_use --missing true dev-util/bzr sftp; then
+ eerror "To fetch sources from ${EBZR_REPO_URI} you need SFTP"
+ eerror "support in dev-util/bzr."
+ die "Please, rebuild dev-util/bzr with the sftp USE flag enabled."
+ fi
;;
*)
die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
@@ -135,14 +177,14 @@
fi
if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
- debug-print "${FUNCNAME}: initial branch. creating bzr directory"
+ debug-print "${FUNCNAME}: initial branch. Creating bzr directory"
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
fi
- cd -P "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
+ pushd "${EBZR_STORE_DIR}" > /dev/null || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"
@@ -151,31 +193,17 @@
debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}"
- local repository
-
- if [[ ${EBZR_REPO_URI} == */* ]]; then
- repository="${EBZR_REPO_URI}${EBZR_BRANCH}"
- else
- repository="${EBZR_REPO_URI}"
- fi
-
+ # Run bzr_initial_fetch() only if the branch has not been pulled
+ # before or if the existing local copy is a full checkout (as did
+ # an older version of bzr.eclass)
if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
- # fetch branch
- einfo "bzr branch start -->"
- einfo " repository: ${repository} => ${EBZR_BRANCH_DIR}"
-
- ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repository}" "${EBZR_BRANCH_DIR}" \
- || die "${EBZR}: can't branch from ${repository}."
-
+ bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
+ elif [[ -d "${EBZR_BRANCH_DIR}"/.bzr/repository/ ]]; then
+ einfo "Re-fetching the branch to save space..."
+ rm -rf "${EBZR_BRANCH_DIR}"
+ bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
else
- # update branch
- einfo "bzr pull start -->"
- einfo " repository: ${repository}"
-
- cd "${EBZR_BRANCH_DIR}"
- ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} "${repository}" \
- || die "${EBZR}: can't merge from ${repository}."
- ${EBZR_DIFFSTAT_CMD}
+ bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
fi
cd "${EBZR_BRANCH_DIR}"
@@ -193,16 +221,16 @@
einfo "Revision ${revision} is now in ${WORKDIR}/${P}"
- cd "${WORKDIR}"
+ popd > /dev/null
}
# @FUNCTION: bzr_bootstrap
# @DESCRIPTION:
-# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified
+# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified.
bzr_bootstrap() {
local patch lpatch
- cd "${S}"
+ pushd "${S}" > /dev/null
if [[ -n ${EBZR_PATCHES} ]] ; then
einfo "apply patches -->"
@@ -211,6 +239,8 @@
if [[ -f ${patch} ]] ; then
epatch ${patch}
else
+ # This loop takes care of wildcarded patches given via
+ # EBZR_PATCHES in an ebuild
for lpatch in "${FILESDIR}"/${patch} ; do
if [[ -f ${lpatch} ]] ; then
epatch ${lpatch}
@@ -235,12 +265,30 @@
|| die "${EBZR}: can't eval EBZR_BOOTSTRAP."
fi
fi
+
+ popd > /dev/null
}
# @FUNCTION: bzr_src_unpack
# @DESCRIPTION:
-# default src_unpack. fetch and bootstrap.
+# Default src_unpack(). Includes bzr_fetch() and bootstrap().
bzr_src_unpack() {
+ if ! [ -z ${EBZR_BRANCH} ]; then
+ # This test will go away on 01 Jul 2010
+ eerror "This ebuild uses EBZR_BRANCH which is not supported anymore"
+ eerror "by the bzr.eclass. Please report this to the ebuild's maintainer."
+ die "EBZR_BRANCH still defined"
+ fi
bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
+ case "${EAPI:-0}" in
+ 0|1) bzr_src_prepare ;;
+ esac
+}
+
+# @FUNCTION: bzr_src_prepare
+# @DESCRIPTION:
+# Default src_prepare(). Executes bzr_bootstrap() for patch
+# application and Make file generation (if needed).
+bzr_src_prepare() {
bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()."
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-08-04 20:18 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-08-04 20:18 UTC (permalink / raw
To: gentoo-commits
fauli 09/08/04 20:18:23
Modified: bzr.eclass
Log:
bzr.eclass: Added patch from Justin Lecher (jlec) <jlec AT j-schmitz DOT net> provided in bug 279770 for a custom setting of EBZR_STORE_DIR
Revision Changes Path
1.3 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.2&r2=1.3
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bzr.eclass 8 Jul 2009 09:47:38 -0000 1.2
+++ bzr.eclass 4 Aug 2009 20:18:23 -0000 1.3
@@ -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.2 2009/07/08 09:47:38 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.3 2009/08/04 20:18:23 fauli Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -35,7 +35,8 @@
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
# The directory to store all fetched Bazaar live sources.
-EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"
+[[ -z ${EBZR_STORE_DIR} ]] && \
+ EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-09-24 7:19 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-09-24 7:19 UTC (permalink / raw
To: gentoo-commits
fauli 09/09/24 07:19:41
Modified: bzr.eclass
Log:
Add support for ESCM_OFFLINE variable, so users without internet connection can make use of it; patch provided by Jonathan Callen in bug 280211
Revision Changes Path
1.4 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.3&r2=1.4
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bzr.eclass 4 Aug 2009 20:18:23 -0000 1.3
+++ bzr.eclass 24 Sep 2009 07:19:41 -0000 1.4
@@ -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 @@
# 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_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
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-09-24 8:11 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-09-24 8:11 UTC (permalink / raw
To: gentoo-commits
fauli 09/09/24 08:11:46
Modified: bzr.eclass
Log:
bzr.eclass: move wrongly placed quote
Revision Changes Path
1.5 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.4&r2=1.5
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bzr.eclass 24 Sep 2009 07:19:41 -0000 1.4
+++ bzr.eclass 24 Sep 2009 08:11:45 -0000 1.5
@@ -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.4 2009/09/24 07:19:41 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.5 2009/09/24 08:11:45 fauli Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -142,7 +142,7 @@
bzr_update() {
local repository="${1}";
- if [[ -n "${EBZR_OFFLINE"} ]]; then
+ if [[ -n "${EBZR_OFFLINE}" ]]; then
einfo "skipping bzr update -->"
einfo " repository: ${repository}"
else
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-12-09 10:04 Mike Frysinger (vapier)
0 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger (vapier) @ 2009-12-09 10:04 UTC (permalink / raw
To: gentoo-commits
vapier 09/12/09 10:04:16
Modified: bzr.eclass
Log:
tweak default EBZR_STORE_DIR value to something eclass-manpages can easily parse
Revision Changes Path
1.6 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.5&r2=1.6
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- bzr.eclass 24 Sep 2009 08:11:45 -0000 1.5
+++ bzr.eclass 9 Dec 2009 10:04:16 -0000 1.6
@@ -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.5 2009/09/24 08:11:45 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.6 2009/12/09 10:04:16 vapier Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -35,8 +35,7 @@
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
# The directory to store all fetched Bazaar live sources.
-[[ -z ${EBZR_STORE_DIR} ]] && \
- EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"
+: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src}
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2009-12-18 7:08 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-12-18 7:08 UTC (permalink / raw
To: gentoo-commits
ulm 09/12/18 07:08:19
Modified: bzr.eclass
Log:
Use "rsync" instead of "bzr export", bug 280211.
Don't always refetch for non-lightweight checkouts, bug 296733.
Some fixes of whitespace and comments.
Revision Changes Path
1.7 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.6&r2=1.7
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- bzr.eclass 9 Dec 2009 10:04:16 -0000 1.6
+++ bzr.eclass 18 Dec 2009 07:08:19 -0000 1.7
@@ -1,18 +1,18 @@
# 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.6 2009/12/09 10:04:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.7 2009/12/18 07:08:19 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
# Ulrich Mueller <ulm@gentoo.org>,
-# Christian Faulhammer <fauli@gentoo.org>
+# Christian Faulhammer <fauli@gentoo.org>,
# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>,
# and anyone who wants to help
-# @BLURB: This eclass provides support to use the Bazaar DSCM
+# @BLURB: This eclass provides support to use the Bazaar VCS
# @DESCRIPTION:
-# The bzr.eclass provides support for apps using the bazaar DSCM
-# (distributed source control management system).
+# The bzr.eclass provides support for apps using the Bazaar VCS
+# (distributed version control system).
# The eclass was originally derived from the git eclass.
#
# Note: Just set EBZR_REPO_URI to the URI of the branch and the src_unpack()
@@ -101,8 +101,10 @@
# @ECLASS-VARIABLE: EBZR_REVISION
# @DESCRIPTION:
-# Revision to fetch, defaults to the latest (see
-# http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec)
+# Revision to fetch, defaults to the latest
+# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+# If you set this to a non-empty value, then it is recommended not to
+# use a lightweight checkout (see also EBZR_FETCH_CMD).
EBZR_REVISION="${EBZR_REVISION:-}"
# @ECLASS-VARIABLE: EBZR_CACHE_DIR
@@ -156,7 +158,6 @@
fi
}
-
# @FUNCTION: bzr_fetch
# @DESCRIPTION:
# Wrapper function to fetch sources from a Bazaar repository via bzr
@@ -189,13 +190,15 @@
if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
debug-print "${FUNCNAME}: initial branch. Creating bzr directory"
+ local save_sandbox_write=${SANDBOX_WRITE}
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
- export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
+ SANDBOX_WRITE=${save_sandbox_write}
fi
- pushd "${EBZR_STORE_DIR}" > /dev/null || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
+ pushd "${EBZR_STORE_DIR}" > /dev/null \
+ || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"
@@ -209,7 +212,8 @@
# an older version of bzr.eclass)
if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
- elif [[ -d "${EBZR_BRANCH_DIR}"/.bzr/repository/ ]]; then
+ elif [[ ${EBZR_FETCH_CMD} == *lightweight* \
+ && -d ${EBZR_BRANCH_DIR}/.bzr/repository ]]; then
einfo "Re-fetching the branch to save space..."
rm -rf "${EBZR_BRANCH_DIR}"
bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
@@ -220,18 +224,18 @@
cd "${EBZR_BRANCH_DIR}"
einfo "exporting ..."
- ${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} "${WORKDIR}/${P}" \
- || die "${EBZR}: export failed"
- local revision
- if [[ -n "${EBZR_REVISION}" ]]; then
- revision="${EBZR_REVISION}"
+ if [[ -z ${EBZR_REVISION} ]]; then
+ rsync -rlpgo --exclude=".bzr/" . "${WORKDIR}/${P}" \
+ || die "${EBZR}: export failed"
else
- revision=$(${EBZR_REVNO_CMD} "${EBZR_BRANCH_DIR}")
+ # revisions of a lightweight checkout are only available when online
+ [[ -z ${EBZR_OFFLINE} || -d ${EBZR_BRANCH_DIR}/.bzr/repository ]] \
+ || die "${EBZR}: No support for revisions when off-line"
+ ${EBZR_EXPORT_CMD} -r "${EBZR_REVISION}" "${WORKDIR}/${P}" \
+ || die "${EBZR}: export failed"
fi
- einfo "Revision ${revision} is now in ${WORKDIR}/${P}"
-
popd > /dev/null
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2010-03-05 9:35 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2010-03-05 9:35 UTC (permalink / raw
To: gentoo-commits
fauli 10/03/05 09:35:24
Modified: bzr.eclass
Log:
move bzr from dev-util to dev-vcs
Revision Changes Path
1.8 eclass/bzr.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/bzr.eclass?r1=1.7&r2=1.8
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- bzr.eclass 18 Dec 2009 07:08:19 -0000 1.7
+++ bzr.eclass 5 Mar 2010 09:35:23 -0000 1.8
@@ -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.7 2009/12/18 07:08:19 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.8 2010/03/05 09:35:23 fauli Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -30,7 +30,7 @@
HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${EBZR} eclass"
-DEPEND=">=dev-util/bzr-1.5"
+DEPEND=">=dev-vcs/bzr-1.5"
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
@@ -176,10 +176,10 @@
http|https|rsync|lp)
;;
sftp)
- if ! built_with_use --missing true dev-util/bzr sftp; then
+ if ! built_with_use --missing true dev-vcs/bzr sftp; then
eerror "To fetch sources from ${EBZR_REPO_URI} you need SFTP"
- eerror "support in dev-util/bzr."
- die "Please, rebuild dev-util/bzr with the sftp USE flag enabled."
+ eerror "support in dev-vcs/bzr."
+ die "Please, rebuild dev-vcs/bzr with the sftp USE flag enabled."
fi
;;
*)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2010-07-01 9:23 Christian Faulhammer (fauli)
0 siblings, 0 replies; 16+ messages in thread
From: Christian Faulhammer (fauli) @ 2010-07-01 9:23 UTC (permalink / raw
To: gentoo-commits
fauli 10/07/01 09:23:37
Modified: bzr.eclass
Log:
Remove check for old fetch directory, people should have migrated up to now
Revision Changes Path
1.9 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.8&r2=1.9
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- bzr.eclass 5 Mar 2010 09:35:23 -0000 1.8
+++ bzr.eclass 1 Jul 2010 09:23:37 -0000 1.9
@@ -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.8 2010/03/05 09:35:23 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.9 2010/07/01 09:23:37 fauli Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -212,11 +212,6 @@
# an older version of bzr.eclass)
if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
- elif [[ ${EBZR_FETCH_CMD} == *lightweight* \
- && -d ${EBZR_BRANCH_DIR}/.bzr/repository ]]; then
- einfo "Re-fetching the branch to save space..."
- rm -rf "${EBZR_BRANCH_DIR}"
- bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
else
bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
fi
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-02-10 20:08 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-02-10 20:08 UTC (permalink / raw
To: gentoo-commits
ulm 11/02/10 20:08:59
Modified: bzr.eclass
Log:
Use branches instead of lightweight checkouts:
1) initial branch with "bzr branch --no-tree",
2) subsequent updates with "bzr pull",
3) export to ${WORKDIR} with "bzr export".
Reintroduce EBZR_BRANCH variable, to allow for shared repositories.
Export EBZR_REVNO and EBZR_WC_PATH variables, bug 311101.
Revision Changes Path
1.11 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.10&r2=1.11
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- bzr.eclass 7 Nov 2010 22:44:35 -0000 1.10
+++ bzr.eclass 10 Feb 2011 20:08:59 -0000 1.11
@@ -1,22 +1,22 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.10 2010/11/07 22:44:35 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.11 2011/02/10 20:08:59 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
-# Ulrich Mueller <ulm@gentoo.org>,
+# Ulrich Müller <ulm@gentoo.org>,
# Christian Faulhammer <fauli@gentoo.org>,
# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>,
# and anyone who wants to help
-# @BLURB: This eclass provides support to use the Bazaar VCS
+# @BLURB: generic fetching functions for the Bazaar VCS
# @DESCRIPTION:
-# The bzr.eclass provides support for apps using the Bazaar VCS
-# (distributed version control system).
-# The eclass was originally derived from the git eclass.
+# The bzr.eclass provides functions to fetch, unpack, patch, and
+# bootstrap sources from repositories of the Bazaar distributed version
+# control system. The eclass was originally derived from git.eclass.
#
-# Note: Just set EBZR_REPO_URI to the URI of the branch and the src_unpack()
-# of this eclass will put an export of the branch in ${WORKDIR}/${PN}.
+# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
+# of this eclass will export the branch to ${WORKDIR}/${P}.
inherit eutils
@@ -30,209 +30,236 @@
HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${EBZR} eclass"
-DEPEND=">=dev-vcs/bzr-1.5"
+DEPEND=">=dev-vcs/bzr-2.0.1"
+case "${EAPI:-0}" in
+ 0|1) ;;
+ *) [[ ${EBZR_REPO_URI%%:*} = sftp ]] \
+ && DEPEND=">=dev-vcs/bzr-2.0.1[sftp]" ;;
+esac
# @ECLASS-VARIABLE: EBZR_STORE_DIR
# @DESCRIPTION:
# The directory to store all fetched Bazaar live sources.
-: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src}
+: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
+
+# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
+# @DESCRIPTION:
+# The Bazaar command to initialise a shared repository.
+: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
# The Bazaar command to fetch the sources.
-EBZR_FETCH_CMD="bzr checkout --lightweight"
+: ${EBZR_FETCH_CMD="bzr branch --no-tree"}
# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
# @DESCRIPTION:
# The Bazaar command to update the sources.
-EBZR_UPDATE_CMD="bzr update"
-
-# @ECLASS-VARIABLE: EBZR_DIFF_CMD
-# @DESCRIPTION:
-# The Bazaar command to get the diff output.
-EBZR_DIFF_CMD="bzr diff"
+: ${EBZR_UPDATE_CMD:="bzr pull"}
# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
# @DESCRIPTION:
# The Bazaar command to export a branch.
-EBZR_EXPORT_CMD="bzr export"
+: ${EBZR_EXPORT_CMD:="bzr export"}
# @ECLASS-VARIABLE: EBZR_REVNO_CMD
# @DESCRIPTION:
# The Bazaar command to list a revision number of the branch.
-EBZR_REVNO_CMD="bzr revno"
+: ${EBZR_REVNO_CMD:="bzr revno"}
# @ECLASS-VARIABLE: EBZR_OPTIONS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# The options passed to the fetch and update commands.
-EBZR_OPTIONS="${EBZR_OPTIONS:-}"
# @ECLASS-VARIABLE: EBZR_REPO_URI
+# @DEFAULT_UNSET
+# @REQUIRED
# @DESCRIPTION:
# The repository URI for the source package.
#
-# @CODE
-# Supported protocols:
-# - http://
-# - https://
-# - sftp://
-# - rsync://
-# - lp:
-# @CODE
+# Note: If the ebuild uses an sftp:// URI, then in EAPI 0 or 1 it must
+# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or
+# later, the eclass will depend on dev-vcs/bzr[sftp].
+
+# @ECLASS-VARIABLE: EBZR_MIRROR_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The URI of a fast mirror of the source repository. If this variable
+# is set, the initial branch will be cloned from the mirror, followed
+# by a pull from the original repository. This is intended for special
+# cases, where download from the original repository is slow, but a fast
+# mirror exists but may be out of date.
#
-# Note: lp: seems to be an alias for https://launchpad.net
-EBZR_REPO_URI="${EBZR_REPO_URI:-}"
+# Normally, this variable needs not be set.
# @ECLASS-VARIABLE: EBZR_BOOTSTRAP
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Bootstrap script or command like autogen.sh or etc.
-EBZR_BOOTSTRAP="${EBZR_BOOTSTRAP:-}"
# @ECLASS-VARIABLE: EBZR_PATCHES
+# @DEFAULT_UNSET
# @DESCRIPTION:
-# bzr eclass can apply patches in bzr_bootstrap().
-# You can use regular expressions in this variable like *.diff or
-# *.patch and the like.
-# NOTE: These patches will bei applied before EBZR_BOOTSTRAP is processed.
+# bzr.eclass can apply patches in bzr_bootstrap(). You can use regular
+# expressions in this variable like *.diff or *.patch and the like.
+# Note: These patches will be applied before EBZR_BOOTSTRAP is processed.
#
-# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
-# location, the installation dies.
-EBZR_PATCHES="${EBZR_PATCHES:-}"
+# Patches are searched both in ${PWD} and ${FILESDIR}. If not found in
+# either location, the installation dies.
-# @ECLASS-VARIABLE: EBZR_REVISION
+# @ECLASS-VARIABLE: EBZR_PROJECT
# @DESCRIPTION:
-# Revision to fetch, defaults to the latest
-# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
-# If you set this to a non-empty value, then it is recommended not to
-# use a lightweight checkout (see also EBZR_FETCH_CMD).
-EBZR_REVISION="${EBZR_REVISION:-}"
+# The project name of your ebuild. Normally, the branch will be stored
+# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
+#
+# If EBZR_BRANCH is set (see below), then a shared repository will be
+# created in that directory, and the branch will be located in
+# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
+: ${EBZR_PROJECT:=${PN}}
-# @ECLASS-VARIABLE: EBZR_CACHE_DIR
+# @ECLASS-VARIABLE: EBZR_BRANCH
+# @DEFAULT_UNSET
# @DESCRIPTION:
-# The directory to store the source for the package, relative to
-# EBZR_STORE_DIR.
+# The directory where to store the branch within a shared repository,
+# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
#
-# default: ${PN}
-EBZR_CACHE_DIR="${EBZR_CACHE_DIR:-${PN}}"
+# This variable should be set if there are several live ebuilds for
+# different branches of the same upstream project. The branches can
+# then share the same repository in EBZR_PROJECT, which will save both
+# data traffic volume and disk space.
+#
+# If there is only a live ebuild for one single branch, EBZR_BRANCH
+# needs not be set. In this case, the branch will be stored in a
+# stand-alone repository directly in EBZR_PROJECT.
+
+# @ECLASS-VARIABLE: EBZR_REVISION
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Revision to fetch, defaults to the latest
+# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
# @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}}"
+# Set this variable to a non-empty value to disable automatic updating
+# of a bzr source tree. This is intended to be set outside the ebuild
+# by users.
+: ${EBZR_OFFLINE:=${ESCM_OFFLINE}}
# @FUNCTION: bzr_initial_fetch
+# @USAGE: <repository URI> <branch directory>
# @DESCRIPTION:
-# Retrieves the source code from a repository for the first time, via
-# ${EBZR_FETCH_CMD}.
+# Internal function, retrieves the source code from a repository for the
+# first time, using ${EBZR_FETCH_CMD}.
bzr_initial_fetch() {
- local repository="${1}";
- local branch_dir="${2}";
+ local repo_uri=$1 branch_dir=$2
+
+ if [[ -n "${EBZR_OFFLINE}" ]]; then
+ ewarn "EBZR_OFFLINE cannot be used when there is no local branch yet."
+ fi
# fetch branch
- einfo "bzr fetch start -->"
- einfo " repository: ${repository} => ${branch_dir}"
+ einfo "bzr branch start -->"
+ einfo " repository: ${repo_uri} => ${branch_dir}"
- ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repository}" "${branch_dir}" \
- || die "${EBZR}: can't branch from ${repository}."
+ ${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repo_uri}" "${branch_dir}" \
+ || die "${EBZR}: can't branch from ${repo_uri}"
}
# @FUNCTION: bzr_update
+# @USAGE: <repository URI> <branch directory>
# @DESCRIPTION:
-# Updates the source code from a repository, via ${EBZR_UPDATE_CMD}.
+# Internal function, updates the source code from a repository, using
+# ${EBZR_UPDATE_CMD}.
bzr_update() {
- local repository="${1}";
+ local repo_uri=$1 branch_dir=$2
if [[ -n "${EBZR_OFFLINE}" ]]; then
- einfo "skipping bzr update -->"
- einfo " repository: ${repository}"
+ einfo "skipping bzr pull -->"
+ einfo " repository: ${repo_uri}"
else
# update branch
- einfo "bzr update start -->"
- einfo " repository: ${repository}"
+ einfo "bzr pull start -->"
+ einfo " repository: ${repo_uri}"
- pushd "${EBZR_BRANCH_DIR}" > /dev/null
- ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \
- || die "${EBZR}: can't update from ${repository}."
+ pushd "${branch_dir}" > /dev/null \
+ || die "${EBZR}: can't chdir to ${branch_dir}"
+ ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} "${repo_uri}" \
+ || die "${EBZR}: can't pull from ${repo_uri}"
popd > /dev/null
fi
}
# @FUNCTION: bzr_fetch
# @DESCRIPTION:
-# Wrapper function to fetch sources from a Bazaar repository via bzr
-# fetch or bzr update, depending on whether there is an existing
-# working copy in ${EBZR_BRANCH_DIR}.
+# Wrapper function to fetch sources from a Bazaar repository with
+# bzr branch or bzr pull, depending on whether there is an existing
+# working copy.
bzr_fetch() {
- local EBZR_BRANCH_DIR
-
- # EBZR_REPO_URI is empty.
- [[ ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty."
+ local repo_dir branch_dir
- # check for the protocol or pull from a local repo.
- if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
- case ${EBZR_REPO_URI%%:*} in
- # lp: seems to be an alias to https://launchpad.net
- http|https|rsync|lp)
- ;;
- sftp)
- if ! built_with_use --missing true dev-vcs/bzr sftp; then
- eerror "To fetch sources from ${EBZR_REPO_URI} you need SFTP"
- eerror "support in dev-vcs/bzr."
- die "Please, rebuild dev-vcs/bzr with the sftp USE flag enabled."
- fi
- ;;
- *)
- die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
- ;;
- esac
- fi
+ [[ -n ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty"
if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
- debug-print "${FUNCNAME}: initial branch. Creating bzr directory"
local save_sandbox_write=${SANDBOX_WRITE}
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
- || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
+ || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}"
SANDBOX_WRITE=${save_sandbox_write}
fi
pushd "${EBZR_STORE_DIR}" > /dev/null \
|| die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
- EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"
+ repo_dir=${EBZR_STORE_DIR}/${EBZR_PROJECT}
+ branch_dir=${repo_dir}${EBZR_BRANCH:+/${EBZR_BRANCH}}
addwrite "${EBZR_STORE_DIR}"
- addwrite "${EBZR_BRANCH_DIR}"
-
- debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}"
- # Run bzr_initial_fetch() only if the branch has not been pulled
- # before or if the existing local copy is a full checkout (as did
- # an older version of bzr.eclass)
- if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
- bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
- else
- bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
+ # Clean up if the existing local copy is a checkout (as was the case
+ # with an older version of bzr.eclass).
+ # This test can be removed after 1 Mar 2012.
+ if [[ ${EBZR_FETCH_CMD} != *checkout* && -d ${repo_dir}/.bzr/checkout ]]
+ then
+ local tmpname=$(mktemp -u "${repo_dir}._old_.XXXXXX")
+ ewarn "checkout from old version of ${EBZR} found, moving it to:"
+ ewarn "${tmpname}"
+ ewarn "you may manually remove it"
+ mv "${repo_dir}" "${tmpname}" \
+ || die "${EBZR}: can't move old checkout out of the way"
fi
- cd "${EBZR_BRANCH_DIR}"
-
- einfo "exporting ..."
+ if [[ ! -d ${branch_dir}/.bzr ]]; then
+ if [[ ${repo_dir} != "${branch_dir}" && ! -d ${repo_dir}/.bzr ]]; then
+ einfo "creating shared bzr repository"
+ ${EBZR_INIT_REPO_CMD} "${repo_dir}" \
+ || die "${EBZR}: can't create shared repository"
+ fi
- if [[ -z ${EBZR_REVISION} ]]; then
- rsync -rlpgo --exclude=".bzr/" . "${WORKDIR}/${P}" \
- || die "${EBZR}: export failed"
+ if [[ -z ${EBZR_MIRROR_URI} ]]; then
+ bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
+ else
+ # Workaround for faster initial download. This clones the
+ # branch from a fast mirror (which may be out of date), and
+ # subsequently pulls from the slow original repository.
+ bzr_initial_fetch "${EBZR_MIRROR_URI}" "${branch_dir}"
+ EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
+ EBZR_OFFLINE="" bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
+ fi
else
- # revisions of a lightweight checkout are only available when online
- [[ -z ${EBZR_OFFLINE} || -d ${EBZR_BRANCH_DIR}/.bzr/repository ]] \
- || die "${EBZR}: No support for revisions when off-line"
- ${EBZR_EXPORT_CMD} -r "${EBZR_REVISION}" "${WORKDIR}/${P}" \
- || die "${EBZR}: export failed"
+ bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
fi
- export EBZR_TREE_CRC32=$(awk '$1 == "crc32:" { print $2; exit }' \
- .bzr/checkout/dirstate)
+ cd "${branch_dir}" || die "${EBZR}: can't chdir to ${branch_dir}"
+
+ # Save some variables in environment. #311101
+ export EBZR_REVNO=$(${EBZR_REVNO_CMD})
+ export EBZR_WC_PATH=${branch_dir}
+
+ einfo "exporting ..."
+ ${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
+ "${WORKDIR}/${P}" . || die "${EBZR}: export failed"
+ einfo "revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${WORKDIR}/${P}"
popd > /dev/null
}
@@ -243,7 +270,7 @@
bzr_bootstrap() {
local patch lpatch
- pushd "${S}" > /dev/null
+ pushd "${S}" > /dev/null || die "${EBZR}: can't chdir to ${S}"
if [[ -n ${EBZR_PATCHES} ]] ; then
einfo "apply patches -->"
@@ -271,11 +298,11 @@
if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then
einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}"
"./${EBZR_BOOTSTRAP}" \
- || die "${EBZR}: can't execute EBZR_BOOTSTRAP."
+ || die "${EBZR}: can't execute EBZR_BOOTSTRAP"
else
einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}"
"${EBZR_BOOTSTRAP}" \
- || die "${EBZR}: can't eval EBZR_BOOTSTRAP."
+ || die "${EBZR}: can't eval EBZR_BOOTSTRAP"
fi
fi
@@ -284,15 +311,10 @@
# @FUNCTION: bzr_src_unpack
# @DESCRIPTION:
-# Default src_unpack(). Includes bzr_fetch() and bootstrap().
+# Default src_unpack(), calls bzr_fetch. For EAPIs 0 and 1, also calls
+# bzr_src_prepare.
bzr_src_unpack() {
- if ! [ -z ${EBZR_BRANCH} ]; then
- # This test will go away on 01 Jul 2010
- eerror "This ebuild uses EBZR_BRANCH which is not supported anymore"
- eerror "by the bzr.eclass. Please report this to the ebuild's maintainer."
- die "EBZR_BRANCH still defined"
- fi
- bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
+ bzr_fetch
case "${EAPI:-0}" in
0|1) bzr_src_prepare ;;
esac
@@ -300,8 +322,7 @@
# @FUNCTION: bzr_src_prepare
# @DESCRIPTION:
-# Default src_prepare(). Executes bzr_bootstrap() for patch
-# application and Make file generation (if needed).
+# Default src_prepare(), calls bzr_bootstrap.
bzr_src_prepare() {
- bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()."
+ bzr_bootstrap
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-02-19 14:43 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-02-19 14:43 UTC (permalink / raw
To: gentoo-commits
ulm 11/02/19 14:43:57
Modified: bzr.eclass
Log:
EBZR_MIRROR_URI is a misnomer, rename it to EBZR_INITIAL_URI.
Revision Changes Path
1.12 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.11&r2=1.12
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- bzr.eclass 10 Feb 2011 20:08:59 -0000 1.11
+++ bzr.eclass 19 Feb 2011 14:43:57 -0000 1.12
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.11 2011/02/10 20:08:59 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.12 2011/02/19 14:43:57 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -82,14 +82,14 @@
# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or
# later, the eclass will depend on dev-vcs/bzr[sftp].
-# @ECLASS-VARIABLE: EBZR_MIRROR_URI
+# @ECLASS-VARIABLE: EBZR_INITIAL_URI
# @DEFAULT_UNSET
# @DESCRIPTION:
-# The URI of a fast mirror of the source repository. If this variable
-# is set, the initial branch will be cloned from the mirror, followed
-# by a pull from the original repository. This is intended for special
-# cases, where download from the original repository is slow, but a fast
-# mirror exists but may be out of date.
+# The URI used for initial branching of the source repository. If this
+# variable is set, the initial branch will be cloned from the location
+# specified, followed by a pull from ${EBZR_REPO_URI}. This is intended
+# for special cases, e.g. when download from the original repository is
+# slow, but a fast mirror exists but may be out of date.
#
# Normally, this variable needs not be set.
@@ -236,15 +236,18 @@
|| die "${EBZR}: can't create shared repository"
fi
- if [[ -z ${EBZR_MIRROR_URI} ]]; then
+ if [[ -z ${EBZR_INITIAL_URI} ]]; then
bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
else
# Workaround for faster initial download. This clones the
- # branch from a fast mirror (which may be out of date), and
+ # branch from a fast server (which may be out of date), and
# subsequently pulls from the slow original repository.
- bzr_initial_fetch "${EBZR_MIRROR_URI}" "${branch_dir}"
- EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
- EBZR_OFFLINE="" bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
+ bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
+ if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
+ EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
+ EBZR_OFFLINE="" \
+ bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
+ fi
fi
else
bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-04-04 11:57 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-04-04 11:57 UTC (permalink / raw
To: gentoo-commits
ulm 11/04/04 11:57:37
Modified: bzr.eclass
Log:
Add : in assignment of EBZR_FETCH_CMD.
Revision Changes Path
1.13 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.12&r2=1.13
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- bzr.eclass 19 Feb 2011 14:43:57 -0000 1.12
+++ bzr.eclass 4 Apr 2011 11:57:37 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.12 2011/02/19 14:43:57 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.13 2011/04/04 11:57:37 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -50,7 +50,7 @@
# @ECLASS-VARIABLE: EBZR_FETCH_CMD
# @DESCRIPTION:
# The Bazaar command to fetch the sources.
-: ${EBZR_FETCH_CMD="bzr branch --no-tree"}
+: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-04-20 17:16 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-04-20 17:16 UTC (permalink / raw
To: gentoo-commits
ulm 11/04/20 17:16:34
Modified: bzr.eclass
Log:
Rename variable ESCM_OFFLINE to EVCS_OFFLINE, following git-2.eclass.
Revision Changes Path
1.14 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.13&r2=1.14
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- bzr.eclass 4 Apr 2011 11:57:37 -0000 1.13
+++ bzr.eclass 20 Apr 2011 17:16:34 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.13 2011/04/04 11:57:37 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.14 2011/04/20 17:16:34 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -144,7 +144,7 @@
# Set this variable to a non-empty value to disable automatic updating
# of a bzr source tree. This is intended to be set outside the ebuild
# by users.
-: ${EBZR_OFFLINE:=${ESCM_OFFLINE}}
+: ${EBZR_OFFLINE=${EVCS_OFFLINE}}
# @FUNCTION: bzr_initial_fetch
# @USAGE: <repository URI> <branch directory>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-07-26 23:22 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-07-26 23:22 UTC (permalink / raw
To: gentoo-commits
ulm 11/07/26 23:22:35
Modified: bzr.eclass
Log:
Don't assign EBZR_WC_PATH, nothing in the tree uses it.
Revision Changes Path
1.15 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.14&r2=1.15
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- bzr.eclass 20 Apr 2011 17:16:34 -0000 1.14
+++ bzr.eclass 26 Jul 2011 23:22:35 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.14 2011/04/20 17:16:34 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.15 2011/07/26 23:22:35 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -255,9 +255,8 @@
cd "${branch_dir}" || die "${EBZR}: can't chdir to ${branch_dir}"
- # Save some variables in environment. #311101
+ # Save revision number in environment. #311101
export EBZR_REVNO=$(${EBZR_REVNO_CMD})
- export EBZR_WC_PATH=${branch_dir}
einfo "exporting ..."
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-09-02 21:26 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-09-02 21:26 UTC (permalink / raw
To: gentoo-commits
ulm 11/09/02 21:26:58
Modified: bzr.eclass
Log:
Eclass documentation now supports @AUTHOR block.
Revision Changes Path
1.16 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.15&r2=1.16
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- bzr.eclass 26 Jul 2011 23:22:35 -0000 1.15
+++ bzr.eclass 2 Sep 2011 21:26:58 -0000 1.16
@@ -1,14 +1,16 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.15 2011/07/26 23:22:35 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.16 2011/09/02 21:26:58 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
-# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>,
-# Ulrich Müller <ulm@gentoo.org>,
-# Christian Faulhammer <fauli@gentoo.org>,
-# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>,
-# and anyone who wants to help
+# Emacs team <emacs@gentoo.org>
+# Bazaar team <bazaar@gentoo.org>
+# @AUTHOR:
+# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
+# Mark Lee <bzr-gentoo-overlay@lazymalevolence.com>
+# Ulrich Müller <ulm@gentoo.org>
+# Christian Faulhammer <fauli@gentoo.org>
# @BLURB: generic fetching functions for the Bazaar VCS
# @DESCRIPTION:
# The bzr.eclass provides functions to fetch, unpack, patch, and
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass
@ 2011-09-22 8:13 Ulrich Mueller (ulm)
0 siblings, 0 replies; 16+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-09-22 8:13 UTC (permalink / raw
To: gentoo-commits
ulm 11/09/22 08:13:09
Modified: bzr.eclass
Log:
Output actual directory in einfo message.
Revision Changes Path
1.17 eclass/bzr.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/bzr.eclass?r1=1.16&r2=1.17
Index: bzr.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- bzr.eclass 2 Sep 2011 21:26:58 -0000 1.16
+++ bzr.eclass 22 Sep 2011 08:13:09 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.16 2011/09/02 21:26:58 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.17 2011/09/22 08:13:09 ulm Exp $
#
# @ECLASS: bzr.eclass
# @MAINTAINER:
@@ -233,7 +233,7 @@
if [[ ! -d ${branch_dir}/.bzr ]]; then
if [[ ${repo_dir} != "${branch_dir}" && ! -d ${repo_dir}/.bzr ]]; then
- einfo "creating shared bzr repository"
+ einfo "creating shared bzr repository: ${repo_dir}"
${EBZR_INIT_REPO_CMD} "${repo_dir}" \
|| die "${EBZR}: can't create shared repository"
fi
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-09-22 8:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 20:08 [gentoo-commits] gentoo-x86 commit in eclass: bzr.eclass Ulrich Mueller (ulm)
-- strict thread matches above, loose matches on Subject: below --
2011-09-22 8:13 Ulrich Mueller (ulm)
2011-09-02 21:26 Ulrich Mueller (ulm)
2011-07-26 23:22 Ulrich Mueller (ulm)
2011-04-20 17:16 Ulrich Mueller (ulm)
2011-04-04 11:57 Ulrich Mueller (ulm)
2011-02-19 14:43 Ulrich Mueller (ulm)
2010-07-01 9:23 Christian Faulhammer (fauli)
2010-03-05 9:35 Christian Faulhammer (fauli)
2009-12-18 7:08 Ulrich Mueller (ulm)
2009-12-09 10:04 Mike Frysinger (vapier)
2009-09-24 8:11 Christian Faulhammer (fauli)
2009-09-24 7:19 Christian Faulhammer (fauli)
2009-08-04 20:18 Christian Faulhammer (fauli)
2009-07-08 9:47 Christian Faulhammer (fauli)
2008-10-25 12:17 Ulrich Mueller (ulm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox