* [gentoo-dev] bzr.eclass @ 2009-02-14 12:21 Christian Faulhammer 2009-02-14 15:37 ` Ulrich Mueller 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto 0 siblings, 2 replies; 19+ messages in thread From: Christian Faulhammer @ 2009-02-14 12:21 UTC (permalink / raw To: gentoo-dev [-- Attachment #1.1: Type: text/plain, Size: 344 bytes --] Hi, a user maintained a Bazaar overlay for some time now and introduced some changes to bzr eclass, I would like to introduce into the tree. Please review the attached patch. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: bzr.eclass.patch --] [-- Type: text/x-patch, Size: 3896 bytes --] --- /usr/portage/eclass/bzr.eclass 2008-10-25 14:17:23.000000000 +0200 +++ eclass/bzr.eclass 2009-02-13 22:54:39.000000000 +0100 @@ -6,6 +6,8 @@ # @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: @@ -25,7 +27,8 @@ HOMEPAGE="http://bazaar-vcs.org/" DESCRIPTION="Based on the ${EBZR} eclass" -DEPEND=">=dev-util/bzr-1.5" +DEPEND=">=dev-util/bzr-1.5 + dev-util/diffstat" # @ECLASS-VARIABLE: EBZR_STORE_DIR # @DESCRIPTION: @@ -35,17 +38,17 @@ # @ECLASS-VARIABLE: EBZR_FETCH_CMD # @DESCRIPTION: # The bzr command to fetch the sources. -EBZR_FETCH_CMD="bzr branch" +EBZR_FETCH_CMD="bzr checkout --lightweight" # @ECLASS-VARIABLE: EBZR_UPDATE_CMD # @DESCRIPTION: # The bzr command to update the sources. -EBZR_UPDATE_CMD="bzr pull" +EBZR_UPDATE_CMD="bzr update" # @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD # @DESCRIPTION: -# The bzr command to get the diffstat output. -EBZR_DIFFSTAT_CMD="bzr diff" +# The bzr command to get the diff output. +EBZR_DIFF_CMD="bzr diff" # @ECLASS-VARIABLE: EBZR_EXPORT_CMD # @DESCRIPTION: @@ -112,12 +115,27 @@ # 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_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 + local EBZR_BRANCH_DIR repository # EBZR_REPO_URI is empty. [[ ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty." @@ -151,31 +169,32 @@ debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}" - local repository - if [[ ${EBZR_REPO_URI} == */* ]]; then - repository="${EBZR_REPO_URI}${EBZR_BRANCH}" + repository="${EBZR_REPO_URI}/${EBZR_BRANCH}" + elif [[ -n ${EBZR_BRANCH} ]] ; 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}." - + bzr_initial_fetch "${repository}" "${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} + local repo_type=$(bzr info "${EBZR_BRANCH_DIR}" | head -n 1 | cut -d '(' -f 1) + if [[ "${repo_type}" != "Lightweight checkout " ]]; then + einfo "Re-fetching the branch to save space..." + rm -rf "${EBZR_BRANCH_DIR}" + bzr_initial_fetch "${repository}" "${EBZR_BRANCH_DIR}" + else + # update branch + einfo "bzr update start -->" + einfo " repository: ${repository}" + + cd "${EBZR_BRANCH_DIR}" + ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \ + || die "${EBZR}: can't update from ${repository}." + ${EBZR_DIFF_CMD} | diffstat + fi fi cd "${EBZR_BRANCH_DIR}" [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] bzr.eclass 2009-02-14 12:21 [gentoo-dev] bzr.eclass Christian Faulhammer @ 2009-02-14 15:37 ` Ulrich Mueller 2009-02-14 16:15 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto 1 sibling, 1 reply; 19+ messages in thread From: Ulrich Mueller @ 2009-02-14 15:37 UTC (permalink / raw To: gentoo-dev >>>>> On Sat, 14 Feb 2009, Christian Faulhammer wrote: > Please review the attached patch. + local repo_type=3D$(bzr info "${EBZR_BRANCH_DIR}" | head -n 1 | cut -d '= (' -f 1) + if [[ "${repo_type}" !=3D "Lightweight checkout " ]]; then This test looks very fragile to me. Could it be replaced by something else? Ulrich ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-14 15:37 ` Ulrich Mueller @ 2009-02-14 16:15 ` Christian Faulhammer 0 siblings, 0 replies; 19+ messages in thread From: Christian Faulhammer @ 2009-02-14 16:15 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 778 bytes --] Hi, Ulrich Mueller <ulm@gentoo.org>: > >>>>> On Sat, 14 Feb 2009, Christian Faulhammer wrote: > > > Please review the attached patch. > > + local repo_type=3D$(bzr info "${EBZR_BRANCH_DIR}" | > head -n 1 | cut -d '= (' -f 1) > + if [[ "${repo_type}" !=3D "Lightweight checkout > " ]]; then > > This test looks very fragile to me. Could it be replaced by something > else? The refetching of old full checkouts is not needed, just a neat feature. After looking at the repository structure a different test could be the existence of .bzr/repository...lightweight checkouts don't have it. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] bzr.eclass 2009-02-14 12:21 [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-14 15:37 ` Ulrich Mueller @ 2009-02-14 18:19 ` Jorge Manuel B. S. Vicetto 2009-02-15 6:49 ` Donnie Berkholz ` (2 more replies) 1 sibling, 3 replies; 19+ messages in thread From: Jorge Manuel B. S. Vicetto @ 2009-02-14 18:19 UTC (permalink / raw To: gentoo-dev [-- Attachment #1.1: Type: text/plain, Size: 547 bytes --] Hi. Christian Faulhammer wrote: > Hi, > > a user maintained a Bazaar overlay for some time now and introduced > some changes to bzr eclass, I would like to introduce into the tree. > Please review the attached patch. > > V-Li I'm attaching a revised patch that tries to improve some issues in the current version in the tree, incorporates your changes and Peter Volkov's (pva) patch about sftp URIs. -- Regards, Jorge Vicetto (jmbsvicetto) - jmbsvicetto at gentoo dot org Gentoo- forums / Userrel / Devrel / SPARC / KDE [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: bzr.eclass.patch --] [-- Type: text/x-patch; name="bzr.eclass.patch", Size: 6004 bytes --] Index: bzr.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v retrieving revision 1.1 diff -u -b -B -r1.1 bzr.eclass --- bzr.eclass 25 Oct 2008 12:17:23 -0000 1.1 +++ bzr.eclass 14 Feb 2009 18:03:39 -0000 @@ -6,6 +6,8 @@ # @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: @@ -25,7 +27,8 @@ HOMEPAGE="http://bazaar-vcs.org/" DESCRIPTION="Based on the ${EBZR} eclass" -DEPEND=">=dev-util/bzr-1.5" +DEPEND=">=dev-util/bzr-1.5 + dev-util/diffstat" # @ECLASS-VARIABLE: EBZR_STORE_DIR # @DESCRIPTION: @@ -35,17 +38,17 @@ # @ECLASS-VARIABLE: EBZR_FETCH_CMD # @DESCRIPTION: # The bzr command to fetch the sources. -EBZR_FETCH_CMD="bzr branch" +EBZR_FETCH_CMD="bzr checkout --lightweight" # @ECLASS-VARIABLE: EBZR_UPDATE_CMD # @DESCRIPTION: # The bzr command to update the sources. -EBZR_UPDATE_CMD="bzr pull" +EBZR_UPDATE_CMD="bzr update" # @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD # @DESCRIPTION: -# The bzr command to get the diffstat output. -EBZR_DIFFSTAT_CMD="bzr diff" +# The bzr command to get the diff output. +EBZR_DIFF_CMD="bzr diff" # @ECLASS-VARIABLE: EBZR_EXPORT_CMD # @DESCRIPTION: @@ -72,10 +75,10 @@ # - https:// # - sftp:// # - rsync:// -# - lp:// +# - lp: # @CODE # -# Note: lp = https://launchpad.net +# Note: lp: seems to be an alias to https://launchpad.net EBZR_REPO_URI="${EBZR_REPO_URI:-}" # @ECLASS-VARIABLE: EBZR_BOOTSTRAP @@ -112,12 +115,55 @@ # 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_FETCH_CMD}. +bzr_update() { + local repository="${1}"; + local branch_dir="${2}"; + local repo_type=$(bzr info "${EBZR_BRANCH_DIR}" | head -n 1 | cut -d '(' -f 1) + + if [[ "${repo_type}" != "Lightweight checkout " ]]; then + + einfo "Re-fetching the branch to save space..." + rm -rf "${EBZR_BRANCH_DIR}" + bzr_initial_fetch "${repository}" "${EBZR_BRANCH_DIR}" + else + + # update branch + einfo "bzr update start -->" + einfo " repository: ${repository}" + + pushd "${EBZR_BRANCH_DIR}" + ${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \ + || die "${EBZR}: can't update from ${repository}." + ${EBZR_DIFF_CMD} | diffstat + popd + fi +} + # @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 + local EBZR_BRANCH_DIR repository # EBZR_REPO_URI is empty. [[ ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty." @@ -125,8 +171,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 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." @@ -142,7 +195,7 @@ export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}" fi - cd -P "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}" + pushd "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}" EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}" @@ -151,31 +204,18 @@ debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}" - local repository - if [[ ${EBZR_REPO_URI} == */* ]]; then - repository="${EBZR_REPO_URI}${EBZR_BRANCH}" + repository="${EBZR_REPO_URI}/${EBZR_BRANCH}" + elif [[ -n ${EBZR_BRANCH} ]] ; 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}." - + bzr_initial_fetch "${repository}" "${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 "${repository}" "${EBZR_BRANCH_DIR}" fi cd "${EBZR_BRANCH_DIR}" @@ -193,7 +233,7 @@ einfo "Revision ${revision} is now in ${WORKDIR}/${P}" - cd "${WORKDIR}" + popd } # @FUNCTION: bzr_bootstrap @@ -202,7 +242,7 @@ bzr_bootstrap() { local patch lpatch - cd "${S}" + pushd "${S}" if [[ -n ${EBZR_PATCHES} ]] ; then einfo "apply patches -->" @@ -235,6 +275,8 @@ || die "${EBZR}: can't eval EBZR_BOOTSTRAP." fi fi + + popd } # @FUNCTION: bzr_src_unpack [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] bzr.eclass 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto @ 2009-02-15 6:49 ` Donnie Berkholz 2009-02-19 8:59 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-19 8:52 ` Christian Faulhammer 2009-02-20 12:30 ` [gentoo-dev] bzr.eclass René 'Necoro' Neumann 2 siblings, 1 reply; 19+ messages in thread From: Donnie Berkholz @ 2009-02-15 6:49 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 478 bytes --] On 17:19 Sat 14 Feb , Jorge Manuel B. S. Vicetto wrote: > # @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD > # @DESCRIPTION: > -# The bzr command to get the diffstat output. > -EBZR_DIFFSTAT_CMD="bzr diff" > +# The bzr command to get the diff output. > +EBZR_DIFF_CMD="bzr diff" > + ${EBZR_DIFF_CMD} | diffstat Why does this need to happen? Please add a comment. -- Thanks, Donnie Donnie Berkholz Developer, Gentoo Linux Blog: http://dberkholz.wordpress.com [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-15 6:49 ` Donnie Berkholz @ 2009-02-19 8:59 ` Christian Faulhammer 2009-02-19 9:26 ` Ulrich Mueller 0 siblings, 1 reply; 19+ messages in thread From: Christian Faulhammer @ 2009-02-19 8:59 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 703 bytes --] Hi, Donnie Berkholz <dberkholz@gentoo.org>: > On 17:19 Sat 14 Feb , Jorge Manuel B. S. Vicetto wrote: > > # @ECLASS-VARIABLE: EBZR_DIFFSTAT_CMD > > # @DESCRIPTION: > > -# The bzr command to get the diffstat output. > > -EBZR_DIFFSTAT_CMD="bzr diff" > > +# The bzr command to get the diff output. > > +EBZR_DIFF_CMD="bzr diff" > > > + ${EBZR_DIFF_CMD} | diffstat > > Why does this need to happen? Please add a comment. It produces Git-like output about how much has changed. I added a comment to the overlay. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-19 8:59 ` [gentoo-dev] bzr.eclass Christian Faulhammer @ 2009-02-19 9:26 ` Ulrich Mueller 2009-02-19 9:42 ` Nirbheek Chauhan 2009-02-19 23:11 ` Christian Faulhammer 0 siblings, 2 replies; 19+ messages in thread From: Ulrich Mueller @ 2009-02-19 9:26 UTC (permalink / raw To: gentoo-dev >>>>> On Thu, 19 Feb 2009, Christian Faulhammer wrote: >> > +# The bzr command to get the diff output. >> > +EBZR_DIFF_CMD="bzr diff" >> >> > + ${EBZR_DIFF_CMD} | diffstat >> >> Why does this need to happen? Please add a comment. > It produces Git-like output about how much has changed. I added a > comment to the overlay. So it is just informational output and the dependency on dev-util/diffstat is not essential. pva has suggested on IRC that diffstat should only be called if it is present. I think this is a good idea. -DEPEND=">=dev-util/bzr-1.5 - dev-util/diffstat" +DEPEND=">=dev-util/bzr-1.5" - ${EBZR_DIFF_CMD} | diffstat + [ -x /usr/bin/diffstat ] && ${EBZR_DIFF_CMD} | /usr/bin/diffstat Ulrich ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] Re: bzr.eclass 2009-02-19 9:26 ` Ulrich Mueller @ 2009-02-19 9:42 ` Nirbheek Chauhan 2009-02-19 15:39 ` Petteri Räty 2009-02-19 23:11 ` Christian Faulhammer 1 sibling, 1 reply; 19+ messages in thread From: Nirbheek Chauhan @ 2009-02-19 9:42 UTC (permalink / raw To: gentoo-dev On Thu, Feb 19, 2009 at 2:56 PM, Ulrich Mueller <ulm@gentoo.org> wrote: > -DEPEND=">=dev-util/bzr-1.5 > - dev-util/diffstat" > +DEPEND=">=dev-util/bzr-1.5" > > - ${EBZR_DIFF_CMD} | diffstat > + [ -x /usr/bin/diffstat ] && ${EBZR_DIFF_CMD} | /usr/bin/diffstat > Isn't this better? type diffstat &>/dev/null && {EBZR_DIFF_CMD} | diffstat It's independent of where diffstat is (in PATH or otherwise) -- ~Nirbheek Chauhan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] Re: bzr.eclass 2009-02-19 9:42 ` Nirbheek Chauhan @ 2009-02-19 15:39 ` Petteri Räty 2009-02-19 15:39 ` Nirbheek Chauhan 0 siblings, 1 reply; 19+ messages in thread From: Petteri Räty @ 2009-02-19 15:39 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 544 bytes --] Nirbheek Chauhan wrote: > On Thu, Feb 19, 2009 at 2:56 PM, Ulrich Mueller <ulm@gentoo.org> wrote: >> -DEPEND=">=dev-util/bzr-1.5 >> - dev-util/diffstat" >> +DEPEND=">=dev-util/bzr-1.5" >> >> - ${EBZR_DIFF_CMD} | diffstat >> + [ -x /usr/bin/diffstat ] && ${EBZR_DIFF_CMD} | /usr/bin/diffstat >> > > Isn't this better? > > type diffstat &>/dev/null && {EBZR_DIFF_CMD} | diffstat > > It's independent of where diffstat is (in PATH or otherwise) > or use has_version dev-util/diffstat Regards, Petteri [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] Re: bzr.eclass 2009-02-19 15:39 ` Petteri Räty @ 2009-02-19 15:39 ` Nirbheek Chauhan 2009-02-19 16:01 ` Petteri Räty 0 siblings, 1 reply; 19+ messages in thread From: Nirbheek Chauhan @ 2009-02-19 15:39 UTC (permalink / raw To: gentoo-dev On Thu, Feb 19, 2009 at 9:09 PM, Petteri Räty <betelgeuse@gentoo.org> wrote: > > or use has_version dev-util/diffstat This is bike-shedding, but that assumes that dev-util/diffstat is the only way diffstat can be installed on the system -- what if the user has diffstat, but it isn't installed by dev-util/diffstat? ;p -- ~Nirbheek Chauhan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] Re: bzr.eclass 2009-02-19 15:39 ` Nirbheek Chauhan @ 2009-02-19 16:01 ` Petteri Räty 0 siblings, 0 replies; 19+ messages in thread From: Petteri Räty @ 2009-02-19 16:01 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 451 bytes --] Nirbheek Chauhan wrote: > On Thu, Feb 19, 2009 at 9:09 PM, Petteri Räty <betelgeuse@gentoo.org> wrote: >> or use has_version dev-util/diffstat > > This is bike-shedding, but that assumes that dev-util/diffstat is the > only way diffstat can be installed on the system -- what if the user > has diffstat, but it isn't installed by dev-util/diffstat? ;p > > Then they should inform their package manager about it. Regards, Petteri [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-19 9:26 ` Ulrich Mueller 2009-02-19 9:42 ` Nirbheek Chauhan @ 2009-02-19 23:11 ` Christian Faulhammer 2009-02-20 7:00 ` Ulrich Mueller 1 sibling, 1 reply; 19+ messages in thread From: Christian Faulhammer @ 2009-02-19 23:11 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1051 bytes --] Hi, Ulrich Mueller <ulm@gentoo.org>: > > It produces Git-like output about how much has changed. I added a > > comment to the overlay. > > So it is just informational output and the dependency on > dev-util/diffstat is not essential. And the more at the current position, the bzr diff call does simply nothing, because there is nothing to diff. The desired call must be just before updating the checkout and it would definitely take a bit longer, although that information is quite nice: $ time (bzr diff --old lp:bzr-gentoo-overlay \ --new /media/disk/bzr-overlay/|diffstat) dev-util/bzr-dbus/Manifest | 2 dev-util/bzr-dbus/bzr-dbus-9999.ebuild | 4 - eclass/bzr.eclass | 79 ++++++++++++++++++++++----------- 3 files changed, 56 insertions(+), 29 deletions(-) real 0m50.088s user 0m1.130s sys 0m0.080s V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-19 23:11 ` Christian Faulhammer @ 2009-02-20 7:00 ` Ulrich Mueller 2009-02-23 19:40 ` Christian Faulhammer 0 siblings, 1 reply; 19+ messages in thread From: Ulrich Mueller @ 2009-02-20 7:00 UTC (permalink / raw To: gentoo-dev >>>>> On Fri, 20 Feb 2009, Christian Faulhammer wrote: > $ time (bzr diff --old lp:bzr-gentoo-overlay \ > --new /media/disk/bzr-overlay/|diffstat) > real 0m50.088s This is prohibitive. Drop it completely, or enable it only if some environment variable is set. Ulrich ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-20 7:00 ` Ulrich Mueller @ 2009-02-23 19:40 ` Christian Faulhammer 0 siblings, 0 replies; 19+ messages in thread From: Christian Faulhammer @ 2009-02-23 19:40 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 537 bytes --] Hi, Ulrich Mueller <ulm@gentoo.org>: > >>>>> On Fri, 20 Feb 2009, Christian Faulhammer wrote: > > > $ time (bzr diff --old lp:bzr-gentoo-overlay \ > > --new /media/disk/bzr-overlay/|diffstat) > > > real 0m50.088s > > This is prohibitive. Drop it completely, or enable it only if some > environment variable is set. Dropped completely in my branch. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto 2009-02-15 6:49 ` Donnie Berkholz @ 2009-02-19 8:52 ` Christian Faulhammer 2009-02-20 12:30 ` [gentoo-dev] bzr.eclass René 'Necoro' Neumann 2 siblings, 0 replies; 19+ messages in thread From: Christian Faulhammer @ 2009-02-19 8:52 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 810 bytes --] Hi, "Jorge Manuel B. S. Vicetto" <jmbsvicetto@gentoo.org>: > Hi. > > Christian Faulhammer wrote: > > Hi, > > > > a user maintained a Bazaar overlay for some time now and introduced > > some changes to bzr eclass, I would like to introduce into the tree. > > Please review the attached patch. > > > > V-Li > > I'm attaching a revised patch that tries to improve some issues in the > current version in the tree, incorporates your changes and Peter > Volkov's (pva) patch about sftp URIs. Thanks, all changes have been incorporated into my branch for the bzr overlay on Launchpad. Some further testing is still needed. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] bzr.eclass 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto 2009-02-15 6:49 ` Donnie Berkholz 2009-02-19 8:52 ` Christian Faulhammer @ 2009-02-20 12:30 ` René 'Necoro' Neumann 2009-02-23 19:45 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2 siblings, 1 reply; 19+ messages in thread From: René 'Necoro' Neumann @ 2009-02-20 12:30 UTC (permalink / raw To: gentoo-dev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jorge Manuel B. S. Vicetto schrieb: > Hi. > > Christian Faulhammer wrote: >> Hi, >> >> a user maintained a Bazaar overlay for some time now and introduced >> some changes to bzr eclass, I would like to introduce into the tree. >> Please review the attached patch. >> >> V-Li > > I'm attaching a revised patch that tries to improve some issues in the > current version in the tree, incorporates your changes and Peter > Volkov's (pva) patch about sftp URIs. > > if [[ ${EBZR_REPO_URI} == */* ]]; then repository="${EBZR_REPO_URI}/${EBZR_BRANCH}" elif [[ -n ${EBZR_BRANCH} ]] ; then ... else ... fi If I see this correctly, this appends EBZR_BRANCH if there is a slash in the REPO_URI ... what kind of guess is this supposed to be? I think, the second test (append iff EBZR_BRANCH is set) should be sufficient. Regards, Necoro -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmeon0ACgkQ4UOg/zhYFuCf7gCfWSyBZrzct0jvUl9W+yml52+K 7ToAmwRry/H/3ZlH0bjNNg82f+gIIzBZ =cqx5 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-20 12:30 ` [gentoo-dev] bzr.eclass René 'Necoro' Neumann @ 2009-02-23 19:45 ` Christian Faulhammer 2009-02-24 12:18 ` Brian Harring 0 siblings, 1 reply; 19+ messages in thread From: Christian Faulhammer @ 2009-02-23 19:45 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1240 bytes --] Hi, René 'Necoro' Neumann <lists@necoro.eu>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jorge Manuel B. S. Vicetto schrieb: > > Hi. > > > > Christian Faulhammer wrote: > >> Hi, > >> > >> a user maintained a Bazaar overlay for some time now and introduced > >> some changes to bzr eclass, I would like to introduce into the > >> tree. Please review the attached patch. > >> > >> V-Li > > > > I'm attaching a revised patch that tries to improve some issues in > > the current version in the tree, incorporates your changes and Peter > > Volkov's (pva) patch about sftp URIs. > > > > > > if [[ ${EBZR_REPO_URI} == */* ]]; then > repository="${EBZR_REPO_URI}/${EBZR_BRANCH}" > elif [[ -n ${EBZR_BRANCH} ]] ; then > ... > else > ... > fi > > If I see this correctly, this appends EBZR_BRANCH if there is a slash > in the REPO_URI ... what kind of guess is this supposed to be? I > think, the second test (append iff EBZR_BRANCH is set) should be > sufficient. Not sure, though I will investigate (and likely drop it). V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-dev] Re: bzr.eclass 2009-02-23 19:45 ` [gentoo-dev] bzr.eclass Christian Faulhammer @ 2009-02-24 12:18 ` Brian Harring 2009-03-02 7:33 ` Christian Faulhammer 0 siblings, 1 reply; 19+ messages in thread From: Brian Harring @ 2009-02-24 12:18 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1071 bytes --] On Mon, Feb 23, 2009 at 08:45:28PM +0100, Christian Faulhammer wrote: > > if [[ ${EBZR_REPO_URI} == */* ]]; then > > repository="${EBZR_REPO_URI}/${EBZR_BRANCH}" > > elif [[ -n ${EBZR_BRANCH} ]] ; then > > ... > > else > > ... > > fi > > > > If I see this correctly, this appends EBZR_BRANCH if there is a slash > > in the REPO_URI ... what kind of guess is this supposed to be? I > > think, the second test (append iff EBZR_BRANCH is set) should be > > sufficient. > > Not sure, though I will investigate (and likely drop it). Kindly drop that; the REPO_URI/BRANCH seperation that is in use there really isn't all that useful for bzr ebuilds in my experience- more often then not it winds up biting me in the ass rather then being useful. My usage (and understanding of bzr), there isn't a scenario where seperation of the repo and branch applies- you only need the branch uri, that encompasses it all (unlike cvs, where this probably was inherited from). So... any reason to even have the var seperation like that? ~harring [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [gentoo-dev] Re: bzr.eclass 2009-02-24 12:18 ` Brian Harring @ 2009-03-02 7:33 ` Christian Faulhammer 0 siblings, 0 replies; 19+ messages in thread From: Christian Faulhammer @ 2009-03-02 7:33 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 832 bytes --] Hi, Brian Harring <ferringb@gmail.com>: > Kindly drop that; the REPO_URI/BRANCH seperation that is in use there > really isn't all that useful for bzr ebuilds in my experience- more > often then not it winds up biting me in the ass rather then being > useful. > My usage (and understanding of bzr), there isn't a scenario where > seperation of the repo and branch applies- you only need the branch > uri, that encompasses it all (unlike cvs, where this probably was > inherited from). Yes, this sounds sane to me, so I will try to work something out. > So... any reason to even have the var seperation like that? Nothing I can think of. V-Li -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2009-03-02 7:34 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-14 12:21 [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-14 15:37 ` Ulrich Mueller 2009-02-14 16:15 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-14 18:19 ` [gentoo-dev] bzr.eclass Jorge Manuel B. S. Vicetto 2009-02-15 6:49 ` Donnie Berkholz 2009-02-19 8:59 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-19 9:26 ` Ulrich Mueller 2009-02-19 9:42 ` Nirbheek Chauhan 2009-02-19 15:39 ` Petteri Räty 2009-02-19 15:39 ` Nirbheek Chauhan 2009-02-19 16:01 ` Petteri Räty 2009-02-19 23:11 ` Christian Faulhammer 2009-02-20 7:00 ` Ulrich Mueller 2009-02-23 19:40 ` Christian Faulhammer 2009-02-19 8:52 ` Christian Faulhammer 2009-02-20 12:30 ` [gentoo-dev] bzr.eclass René 'Necoro' Neumann 2009-02-23 19:45 ` [gentoo-dev] bzr.eclass Christian Faulhammer 2009-02-24 12:18 ` Brian Harring 2009-03-02 7:33 ` Christian Faulhammer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox