Skip to contentSkip to conversation

Fix for bitbake freeze due to git fetch during parse

PATCH In review Paul Eggleton 5 participants 11 messages Jun 21, 2011 – Jun 22, 2011

lore
Share & tools
lore
#0 lore raw

cover Fix for bitbake freeze due to git fetch during parse

Addresses [YOCTO #1186]. See patch for further details. (Sending against poky-contrib since OE git is currently experiencing issues.)

The following changes since commit 2163461ec94528ecf046a04edc5db3d2dd3a6b8b:

systemtap: remove non-core COMPATIBLE_MACHINES (2011-06-16 22:14:06 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib paule/fix-uboot-srcrev
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/fix-uboot-srcrev

Paul Eggleton (1):
u-boot: set SRCREV to a git revision instead of a tag reference

 meta/recipes-bsp/uboot/u-boot_2011.03.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 u-boot: set SRCREV to a git revision instead of a tag reference

If we use a tag here then bitbake has to connect to the repository to find out the corresponding revision (so it can expand SRCPV which is part of PV, which amongst other things is needed to determine whether or not the package has to be rebuilt.) This occurs at parse time; on machines behind a firewall or with no network access this can be a problem.

We wish to avoid unnecessary network accesses and network access in our default configuration during parse time is even worse. Substituting the git revision corresponding to the tag prevents bitbake from having to contact the remote repository in order to expand PV.

Addresses [YOCTO #1186]

---
 meta/recipes-bsp/uboot/u-boot_2011.03.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/uboot/u-boot_2011.03.bb +2 -2
index 07f0609..25af69b 100644
@@ -12,9 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-git/${MACHINE}"
 
-SRCREV = "v2011.03"
+SRCREV = "19b54a701811220221fc4d5089a2bb18892018ca"
 PV = "v2011.03+git${SRCPV}"
-PR="r4"
+PR = "r5"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
 
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Quoted 6 lines · Paul Eggleton

If we use a tag here then bitbake has to connect to the repository to find out the corresponding revision (so it can expand SRCPV which is part of PV, which amongst other things is needed to determine whether or not the package has to be rebuilt.) This occurs at parse time; on machines behind a firewall or with no network access this can be a problem.

Quoted 8 lines

We wish to avoid unnecessary network accesses and network access in our default configuration during parse time is even worse. Substituting the git revision corresponding to the tag prevents bitbake from having to contact the remote repository in order to expand PV.

Addresses [YOCTO #1186]

Great work tracking this down! I wonder if it's worth mentioning in the metadata that the revision corresponds to the tag?

Quoted 20 lines
---
 meta/recipes-bsp/uboot/u-boot_2011.03.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/uboot/u-boot_2011.03.bb +2 -2
index 07f0609..25af69b 100644
@@ -12,9 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-git/${MACHINE}"
 
-SRCREV = "v2011.03"
+SRCREV = "19b54a701811220221fc4d5089a2bb18892018ca"
 PV = "v2011.03+git${SRCPV}"
-PR="r4"
+PR = "r5"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
 
Signature · 3 lines
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre
#3 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Quoted 1 line · On Tuesday 21 June 2011 18:33:17 Joshua Lock wrote:

Great work tracking this down!

Thanks, actually Dexuan gets the credit for at least pointing me in the right direction.

Quoted 2 lines

I wonder if it's worth mentioning in the metadata that the revision corresponds to the tag?

Done, have updated the contrib branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=paule/fix-
uboot-srcrev

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

In reply to Paul Eggleton

Op 21 jun 2011, om 19:29 heeft Paul Eggleton het volgende geschreven:

Quoted 29 lines

If we use a tag here then bitbake has to connect to the repository to find out the corresponding revision (so it can expand SRCPV which is part of PV, which amongst other things is needed to determine whether or not the package has to be rebuilt.) This occurs at parse time; on machines behind a firewall or with no network access this can be a problem.

We wish to avoid unnecessary network accesses and network access in our default configuration during parse time is even worse. Substituting the git revision corresponding to the tag prevents bitbake from having to contact the remote repository in order to expand PV.

Addresses [YOCTO #1186]

---
meta/recipes-bsp/uboot/u-boot_2011.03.bb | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/uboot/u-boot_2011.03.bb +0 -0
index 07f0609..25af69b 100644
@@ -12,9 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
 

FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-git/${MACHINE}"

meta/recipes-bsp/uboot/u-boot_2011.03.bb +1 -1
-SRCREV = "v2011.03"
+SRCREV = "19b54a701811220221fc4d5089a2bb18892018ca"

PV = "v2011.03+git${SRCPV}"

meta/recipes-bsp/uboot/u-boot_2011.03.bb LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \ · line 17

Quoted 2 lines
meta/recipes-bsp/uboot/u-boot_2011.03.bb +1 -1
-PR="r4"
+PR = "r5"

Can you add a comment above the rev in the lines of "bitbake sucks, we need to use a rev instead of a tag, this one maps to 2011.03"?

#5 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Quoted 2 lines · On Tuesday 21 June 2011 18:34:54 Koen Kooi wrote:

Can you add a comment above the rev in the lines of "bitbake sucks, we need to use a rev instead of a tag, this one maps to 2011.03"?

I will add a comment about the revision corresponding to the tag, good idea.

However, if you do specify a tag for SRCREV and SRCPV is part of PV, then bitbake needs to fetch the revision from the repo in order to determine SRCPV so it can expand PV when it comes to figure out if a recipe needs to be rebuilt or not (remembering that if SRCREV isn't a full revision, bitbake can't tell if what you've specified is a "fixed" tag or a potentially moving branch.

If you've got a better idea on how to handle this I'd love to hear it.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#6 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Op 21 jun 2011, om 19:42 heeft Paul Eggleton het volgende geschreven:

Quoted 7 lines · On Tuesday 21 June 2011 18:34:54 Koen Kooi wrote:
Quoted 2 lines

Can you add a comment above the rev in the lines of "bitbake sucks, we need to use a rev instead of a tag, this one maps to 2011.03"?

I will add a comment about the revision corresponding to the tag, good idea.

However, if you do specify a tag for SRCREV and SRCPV is part of PV

Since we're using the 2011.03 tag, why is SRCPV in PV at all? It should be exactly the same as the tarball.

#7 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Quoted 2 lines · On Tuesday 21 June 2011 18:54:12 Koen Kooi wrote:

Since we're using the 2011.03 tag, why is SRCPV in PV at all? It should be exactly the same as the tarball.

One might go one step further and ask why fetching from git is a good idea when the tarball would be much cleaner. Ultimately this is up to whoever maintains the u-boot recipe.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#8 lore raw

Re: [PATCH 1/1] u-boot: set SRCREV to a git revision instead of a tag reference

Quoted 7 lines · Paul Eggleton
Quoted 2 lines · On Tuesday 21 June 2011 18:54:12 Koen Kooi wrote:

Since we're using the 2011.03 tag, why is SRCPV in PV at all? It should be exactly the same as the tarball.

One might go one step further and ask why fetching from git is a good idea when the tarball would be much cleaner. Ultimately this is up to whoever maintains the u-boot recipe.

Especially with the current git archive mirroring problem.

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#10 lore raw
In reply to Paul Eggleton
Quoted 11 lines · Paul Eggleton

Addresses [YOCTO #1186]. See patch for further details. (Sending against poky-contrib since OE git is currently experiencing issues.)

The following changes since commit 2163461ec94528ecf046a04edc5db3d2dd3a6b8b:

systemtap: remove non-core COMPATIBLE_MACHINES (2011-06-16 22:14:06 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib paule/fix-uboot-srcrev
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/fix-uboot-srcrev

Quoted 5 lines

Paul Eggleton (1):
u-boot: set SRCREV to a git revision instead of a tag reference

 meta/recipes-bsp/uboot/u-boot_2011.03.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

I've merged Paul's updated version of this. Its a hard problem given git's way of handling tags/branches etc. so its probably the best we can do in the circumstances...

Cheers,

Richard