[OE-core] BB_NO_NETWORK broken for git

Gary Thomas gary at mlbassoc.com
Thu Dec 5 12:18:44 UTC 2013


I try to use a local source mirror, fully populated with packages, so I
can deliver a complete (no network required) bundle to my customers.  This
has recently been broken.

I can no longer use BB_NO_NETWORK=1 for git recipes, since this revision:
commit 2354250a95eab484459f41f8715ae112295c2174
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Mon Nov 18 17:17:16 2013 +0000

     bitbake: git: Use merge-base instead of log for testing if a commit is present

     The current use of git log to check if a given revision is present can be
     a little fragile.

     For example if revision X was on branch A, and then later added to branch
     B, the update checks would not notice this since they just check for X
     being in the repository.

     We also had some autobuilder corruption where an older packed-refs file
     was copied over a new repository containing newer pack files. There
     was no update to the refs file since the revision was present but
     not accessible in any branch.

     The correct fix is to check that the required revisions are present
     on the specific branches. This patch does this using merge-base.

     (Bitbake rev: 89abfbc1953e3711d6c90aff793ee622c22609b1)

     Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

To test this, just add these settings to local.conf
   SOURCE_MIRROR_URL ?= "file:///work/misc/Poky/sources/"
   INHERIT += "own-mirrors"
   BB_NO_NETWORK = "1"
   BB_GENERATE_MIRROR_TARBALLS ?= "1"

Make sure and put the appropriate git tarball into the SOURCE_MIRROR.
I tested this using prelink, e.g.
   $ bitbake prelink -c fetch
the the tarball is git2_git.yoctoproject.org.prelink-cross.git.tar.gz
A copy of this is at
   http://www.mlbassoc.com/poky/git2_git.yoctoproject.org.prelink-cross.git.tar.gz

Filed as bug #5631 (https://bugzilla.yoctoproject.org/show_bug.cgi?id=5631)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the Openembedded-core mailing list