Skip to contentSkip to conversation

Issue with git fetcher

DISCUSSION Gary Thomas 4 participants 6 messages Oct 18, 2012

lore
Share & tools
lore
#0 lore raw

I like to run Poky/Yocto with a pre-populated source cache,
built up over time, and rely on BB_NO_NETWORK to tell me
when stuff actually needs to come from the network. This
works quite well - only when there is a new/changed recipe
do I have to relax BB_NO_NETWORK and once I've built the
offending recipe, I save the sources (I also use BB_GENERATE_MIRROR_TARBALLS="1") back to my source cache.

I ran across an issue with this with a recipe I imported from meta-openembedded/meta-oe. It contained these lines:
SRCREV = "2fb4be9a99a2c2a9435339830e3d940171cc0d9b"
SRC_URI = "git://git.libav.org/libav.git;protocol=git;branch=release/0.8"

So, the first time I built it without BB_NO_NETWORK, then I saved the resulting tar file. However, when I tried to build it again, this time in a new build tree with BB_NO_NETWORK set, it failed! I went looking through the tar file (just a bare clone of the git tree) and found that the revision in question was not there.

The only thing I could see that's unique about this recipe is the 'branch=release/0.8'. To see if this was the issue, I removed it and replayed the whole process (rebuilding the tar file) & now fetch works even with BB_NO_NETWORK :-)

Is this expected, or is it a bug?

n.b. I hammer on this functionality as I have to deliver fixed source packages to customers (some of whom may not have easy network access, some who just want to know what they are getting/using), so I rely on being able to build with BB_NO_NETWORK set.

Thanks

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 25 lines · Gary Thomas

I like to run Poky/Yocto with a pre-populated source cache, built up over time, and rely on BB_NO_NETWORK to tell me when stuff actually needs to come from the network. This works quite well - only when there is a new/changed recipe do I have to relax BB_NO_NETWORK and once I've built the offending recipe, I save the sources (I also use BB_GENERATE_MIRROR_TARBALLS="1")
back to my source cache.

I ran across an issue with this with a recipe I imported from meta-openembedded/meta-oe. It contained these lines:
SRCREV = "2fb4be9a99a2c2a9435339830e3d940171cc0d9b"
SRC_URI = "git://git.libav.org/libav.git;protocol=git;branch=release/0.8"

So, the first time I built it without BB_NO_NETWORK, then I saved the resulting tar file. However, when I tried to build it again, this time in a new build tree with BB_NO_NETWORK set, it failed! I went looking through the tar file (just a bare clone of the git tree) and found that the revision in question was not there.

The only thing I could see that's unique about this recipe is the 'branch=release/0.8'. To see if this was the issue, I removed it and replayed the whole process (rebuilding the tar file) & now fetch works even with BB_NO_NETWORK :-)

Quoted 6 lines

Is this expected, or is it a bug?

n.b. I hammer on this functionality as I have to deliver fixed source packages to customers (some of whom may not have easy network access, some who just want to know what they are getting/using), so I rely on being able to build with BB_NO_NETWORK set.

Was there some recent discussion on oe-core about this?

-M

#2 lore raw
In reply to Gary Thomas
Quoted 4 lines · Gary Thomas

I ran across an issue with this with a recipe I imported from meta-openembedded/meta-oe. It contained these lines:
SRCREV = "2fb4be9a99a2c2a9435339830e3d940171cc0d9b"
SRC_URI = "git://git.libav.org/libav.git;protocol=git;branch=release/0.8"

Specifying a revision *and* specifying a branch doesn't make sense with git. Presumably the SRCREV is the correct reference and the branch parameter is just causing network traffic for no reason.

Removing the branch parameter sounds like exactly the right thing to do.

Ross

#3 lore raw
Quoted 11 lines · Ross
Quoted 4 lines · Gary Thomas

I ran across an issue with this with a recipe I imported from meta-openembedded/meta-oe. It contained these lines:

   SRCREV = "2fb4be9a99a2c2a9435339830e3d940171cc0d9b"
   SRC_URI = "git://git.libav.org/libav.git;protocol=git;branch=release/0.8"

Specifying a revision *and* specifying a branch doesn't make sense with git. Presumably the SRCREV is the correct reference and the branch parameter is just causing network traffic for no reason.

Removing the branch parameter sounds like exactly the right thing to do.

That's pretty much what I thought.

Maybe a warning or some such would be useful here.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#4 lore raw
In reply to Burton, Ross
Quoted 9 lines · Ross
Quoted 4 lines · Gary Thomas

I ran across an issue with this with a recipe I imported from meta-openembedded/meta-oe. It contained these lines:
SRCREV = "2fb4be9a99a2c2a9435339830e3d940171cc0d9b"
SRC_URI = "git://git.libav.org/libav.git;protocol=git;branch=release/0.8"

Specifying a revision *and* specifying a branch doesn't make sense with git. Presumably the SRCREV is the correct reference and the branch parameter is just causing network traffic for no reason.

It does make sense.

e.g. AUTOREV set in some .inc file.

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw
Quoted 3 lines · Martin Jansa

It does make sense.

e.g. AUTOREV set in some .inc file.

Fair enough. If anyone is actually doing that with libav then this can remain, but clearly bitbake's fetcher has a bug too then - it shouldn't hit the network to resolve a branch name if it has an explicit srcrev.

Ross