* [gentoo-dev] Update for bzr.eclass
@ 2013-07-07 17:54 Ulrich Mueller
2013-07-07 18:35 ` Mike Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Mueller @ 2013-07-07 17:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
Hi all,
Find below a small update for bzr.eclass.
Sometimes it is convenient to unpack the sources in a location
different from ${WORKDIR}/${P}. The patch makes this configurable via
a new EBZR_UNPACK_DIR variable. The default location doesn't change,
so there should be no issues with backwards compatibility.
Please review.
Ulrich
--- bzr.eclass 18 Sep 2012 06:41:45 -0000 1.19
+++ bzr.eclass 7 Jul 2013 17:47:06 -0000
@@ -41,6 +41,11 @@
# The directory to store all fetched Bazaar live sources.
: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
+# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
+# @DESCRIPTION:
+# The working directory where the sources are copied to.
+: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
+
# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
# @DESCRIPTION:
# The Bazaar command to initialise a shared repository.
@@ -261,13 +266,14 @@
if [[ -n ${EBZR_WORKDIR_CHECKOUT} ]]; then
einfo "checking out ..."
${EBZR_CHECKOUT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
- . "${WORKDIR}/${P}" || die "${EBZR}: checkout failed"
+ . "${EBZR_UNPACK_DIR}" || die "${EBZR}: checkout failed"
else
einfo "exporting ..."
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} \
- "${WORKDIR}/${P}" . || die "${EBZR}: export failed"
+ "${EBZR_UNPACK_DIR}" . || die "${EBZR}: export failed"
fi
- einfo "revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${WORKDIR}/${P}"
+ einfo \
+ "revision ${EBZR_REVISION:-${EBZR_REVNO}} is now in ${EBZR_UNPACK_DIR}"
popd > /dev/null
}
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] Update for bzr.eclass
2013-07-07 17:54 [gentoo-dev] Update for bzr.eclass Ulrich Mueller
@ 2013-07-07 18:35 ` Mike Gilbert
2013-07-07 18:53 ` Ulrich Mueller
0 siblings, 1 reply; 3+ messages in thread
From: Mike Gilbert @ 2013-07-07 18:35 UTC (permalink / raw
To: Gentoo Dev
On Sun, Jul 7, 2013 at 1:54 PM, Ulrich Mueller <ulm@gentoo.org> wrote:
> Hi all,
> Find below a small update for bzr.eclass.
>
> Sometimes it is convenient to unpack the sources in a location
> different from ${WORKDIR}/${P}. The patch makes this configurable via
> a new EBZR_UNPACK_DIR variable. The default location doesn't change,
> so there should be no issues with backwards compatibility.
>
git-2.eclass has a similar variable called EGIT_SOURCEDIR. Maybe you
could reuse the same convention?
Out of curiosity, I checked mercurial and subversion eclasses; they
don't provide a variable, but do allow you to call the fetch function
manually with a parameter to override the destination.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] Update for bzr.eclass
2013-07-07 18:35 ` Mike Gilbert
@ 2013-07-07 18:53 ` Ulrich Mueller
0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Mueller @ 2013-07-07 18:53 UTC (permalink / raw
To: gentoo-dev
>>>>> On Sun, 7 Jul 2013, Mike Gilbert wrote:
> git-2.eclass has a similar variable called EGIT_SOURCEDIR. Maybe you
> could reuse the same convention?
In fact, I had considered this, but I think that EBZR_SOURCEDIR isn't
a good name because it's not distinctive. For example, EBZR_STORE_DIR
contains a repository of sources, too.
> Out of curiosity, I checked mercurial and subversion eclasses; they
> don't provide a variable, but do allow you to call the fetch
> function manually with a parameter to override the destination.
And they're not compatible with each other:
# @FUNCTION: subversion_fetch
# @USAGE: [repo_uri] [destination]
# @FUNCTION: mercurial_fetch
# @USAGE: [repository_uri] [module] [sourcedir]
Ulrich
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-07 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-07 17:54 [gentoo-dev] Update for bzr.eclass Ulrich Mueller
2013-07-07 18:35 ` Mike Gilbert
2013-07-07 18:53 ` Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox