Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280211 - Add support for EBZR_OFFLINE and ESCM_OFFLINE to bzr.eclass
Summary: Add support for EBZR_OFFLINE and ESCM_OFFLINE to bzr.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jorge Manuel B. S. Vicetto
URL:
Whiteboard:
Keywords:
: 280854 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-03 20:39 UTC by Jonathan Callen (RETIRED)
Modified: 2009-12-18 07:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for bzr.eclass (bzr.eclass.diff,1.23 KB, patch)
2009-08-03 20:44 UTC, Jonathan Callen (RETIRED)
Details | Diff
Proposed patch for bzr.eclass (bzr.eclass.diff,2.05 KB, patch)
2009-12-13 20:20 UTC, Ulrich Müller
Details | Diff
Proposed patch for bzr.eclass (bzr.eclass.diff,1.84 KB, patch)
2009-12-14 21:01 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Callen (RETIRED) gentoo-dev 2009-08-03 20:39:17 UTC
This patch adds support for EBZR_OFFLINE and ESCM_OFFLINE to bzr.eclass, in a method similar to git.eclass and svn.eclass.
Comment 1 Jonathan Callen (RETIRED) gentoo-dev 2009-08-03 20:44:03 UTC
Created attachment 200050 [details, diff]
patch for bzr.eclass
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2009-08-04 15:44:08 UTC
Seems ok for me.

I have one question, though. Has anyone documented ${ESCM_OFFLINE}? From the use and name, I get the impression it's meant to be an SCM-agnostic variable, but a grep on /gentoo-x86/eclass only returns the use in both git and subversion eclasses, but no documentation about it.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2009-08-08 21:46:09 UTC
(In reply to comment #2)
> Seems ok for me.

 I agree here.

> I have one question, though. Has anyone documented ${ESCM_OFFLINE}? From the
> use and name, I get the impression it's meant to be an SCM-agnostic variable,
> but a grep on /gentoo-x86/eclass only returns the use in both git and
> subversion eclasses, but no documentation about it.

 Maybe ask in -dev?
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2009-08-10 15:53:43 UTC
*** Bug 280854 has been marked as a duplicate of this bug. ***
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2009-09-24 07:19:26 UTC
Ok, there were no objections, so I just committed the patch.  Thank you very much for your patience and support.
Comment 6 Ulrich Müller gentoo-dev 2009-12-13 10:34:24 UTC
It doesn't work: In spite of EBZR_OFFLINE being set to a non-empty value, it's still accessing the network during "bzr export".

This is with EBZR_FETCH_CMD left at its default value, i.e. "lightweight" checkout.
Comment 7 Ulrich Müller gentoo-dev 2009-12-13 16:46:10 UTC
More findings (all tests are with the GNU Emacs repo and a 2 Mbit/s connection):

With --lightweight option:
    bzr checkout:  11 minutes
    bzr update:    < 1 minute (for unchanged repo)
    bzr export:    54 minutes (also for subsequent updates!)
    repo size:     116 MB

Without --lightweight option:
    bzr checkout:  48 minutes
    bzr update:    < 1 minute
    bzr export:    < 1 minute
    repo size:     327 MB

Looks like we shouldn't use export in the case of lightweight checkouts? Replacing it by "cp -RP -p" seems to have no adverse effects in the case of Emacs.
Comment 8 Ulrich Müller gentoo-dev 2009-12-13 20:20:02 UTC
Created attachment 212915 [details, diff]
Proposed patch for bzr.eclass

Attached patch should fix the export issue and the issue from bug 296733.
Comment 9 Ulrich Müller gentoo-dev 2009-12-14 21:01:51 UTC
Created attachment 213031 [details, diff]
Proposed patch for bzr.eclass

Simplified logic when to use "rsync" and when "bzr export".

I also think we don't need the einfo message about the revision, because "bzr update" outputs it already (and if we are offline the revision isn't available).
Comment 10 Ulrich Müller gentoo-dev 2009-12-18 07:09:18 UTC
(In reply to comment #9)
> Created an attachment (id=213031) [details]
> Proposed patch for bzr.eclass

Committed.