Skip to contentSkip to conversation

Shortened git hashes causing pain

PATCH Gary Thomas 2 participants 4 messages May 23, 2013

lore
Share & tools
lore
#0 lore raw

The shortening of the git hashes in this commit
commit 77fc40a0f843e2488b356d90b64ef436c11c9973
Author: Richard Purdie <[email protected]>
Date: Sun May 19 13:21:55 2013 +0300
bitbake: fetch2: Shorten long srcrevs
is causing some problems.

I have a simple .bbappend for gtk-sato-engine (attached) which just applies a one-line patch. When I build this recipe, I get two different work trees (this is from scratch):

$ ls -l tmp/work/cobra4430p82-amltd-linux-gnueabi/gtk-sato-engine
total 8
drwxrwxr-x  3 gthomas gthomas 4096 May 23 09:12 0.3.3+gitAUTOINC+4740ad8d53aba4368ce3e03b06cfdc69eb86dcdc-r0
drwxrwxr-x 11 gthomas gthomas 4096 May 23 09:13 0.3.3+gitAUTOINC+4740ad8d53-r0

Note: it doesn't seem to happen for the virgin gtk-sato-engine recipe, only when my patch is applied.

I discovered this when I tried building in an existing tree which had been built before the mentioned change to the fetch code. There were sstate files that used the long hash that the build seemed to want to use but got terribly confused and ended up creating empty packages, breaking my build. Trying to run 'cleansstate' on the failing packages did nothing as the code only cleans up based on the new hash and left the old files still there...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

#
# Just tell BitBake where to find my component files #
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI_append = " file://adjust-sato-theme.patch \
"

PACKAGE_ARCH = "${MACHINE_ARCH}"

data/gtkrc-vga +1 -1
Index: git/data/gtkrc-vga
===================================================================
@@ -5,7 +5,7 @@
 #   dark gray: cbccc9
 #   light gray: eeeeec
 
-gtk_button_images = 0
+gtk_button_images = 1
 gtk_menu_images = 0
 
 gtk_color_scheme = "bg_color:#eeeeec;fg_color:#555753;text_color:#555753;base_color:#fff;selected_bg_color:#6c3;selected_fg_color:#555753"
#1 lore raw
Quoted 10 lines · Gary Thomas

The shortening of the git hashes in this commit
commit 77fc40a0f843e2488b356d90b64ef436c11c9973
Author: Richard Purdie <[email protected]>
Date: Sun May 19 13:21:55 2013 +0300
bitbake: fetch2: Shorten long srcrevs
is causing some problems.

I have a simple .bbappend for gtk-sato-engine (attached) which just applies a one-line patch. When I build this recipe, I get two different work trees (this is from scratch):

Quoted 7 lines
$ ls -l tmp/work/cobra4430p82-amltd-linux-gnueabi/gtk-sato-engine
total 8
drwxrwxr-x  3 gthomas gthomas 4096 May 23 09:12 0.3.3+gitAUTOINC+4740ad8d53aba4368ce3e03b06cfdc69eb86dcdc-r0
drwxrwxr-x 11 gthomas gthomas 4096 May 23 09:13 0.3.3+gitAUTOINC+4740ad8d53-r0

Note: it doesn't seem to happen for the virgin gtk-sato-engine recipe, only when my patch is applied.

Try moving the cache directory in tmp/ out the way. I suspect some kind of caching issue since there should not be two work directories. What is the contents of each?

Cheers,

Richard

#2 lore raw
Quoted 16 lines · Richard Purdie
Quoted 15 lines · Gary Thomas

The shortening of the git hashes in this commit
commit 77fc40a0f843e2488b356d90b64ef436c11c9973
Author: Richard Purdie <[email protected]>
Date: Sun May 19 13:21:55 2013 +0300
bitbake: fetch2: Shorten long srcrevs
is causing some problems.

I have a simple .bbappend for gtk-sato-engine (attached) which just applies a one-line patch. When I build this recipe, I get two different work trees (this is from scratch):

$ ls -l tmp/work/cobra4430p82-amltd-linux-gnueabi/gtk-sato-engine
total 8
drwxrwxr-x  3 gthomas gthomas 4096 May 23 09:12 0.3.3+gitAUTOINC+4740ad8d53aba4368ce3e03b06cfdc69eb86dcdc-r0
drwxrwxr-x 11 gthomas gthomas 4096 May 23 09:13 0.3.3+gitAUTOINC+4740ad8d53-r0
Quoted 6 lines
Quoted 2 lines

Note: it doesn't seem to happen for the virgin gtk-sato-engine recipe, only when my patch is applied.

Try moving the cache directory in tmp/ out the way. I suspect some kind of caching issue since there should not be two work directories. What is the contents of each?

Wow, that caused a boatload of other packages to be rebuilt, including qemu-native, which took forever :-(

This did remove the problem - there is now only the build tree with the short hash name. Sadly, it's also now forcing me to basically rebuild everything to get back to being able to build my image, just what I didn't want to happen.

Oh well, once this finished I'm sure all will be fine again. At least my pain may help others that might experience this, although I don't know how many folks do very long term development/builds in a single tree. This one has been one of my main projects and was started in early March with more than 500 builds (entries in tmp/log/cooker)!

Thanks

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
In reply to Gary Thomas
Quoted 18 lines · Gary Thomas

The shortening of the git hashes in this commit
commit 77fc40a0f843e2488b356d90b64ef436c11c9973
Author: Richard Purdie <[email protected]>
Date: Sun May 19 13:21:55 2013 +0300
bitbake: fetch2: Shorten long srcrevs
is causing some problems.

I have a simple .bbappend for gtk-sato-engine (attached) which just applies a one-line patch. When I build this recipe, I get two different work trees (this is from scratch):

$ ls -l tmp/work/cobra4430p82-amltd-linux-gnueabi/gtk-sato-engine
total 8
drwxrwxr-x  3 gthomas gthomas 4096 May 23 09:12 0.3.3+gitAUTOINC+4740ad8d53aba4368ce3e03b06cfdc69eb86dcdc-r0
drwxrwxr-x 11 gthomas gthomas 4096 May 23 09:13 0.3.3+gitAUTOINC+4740ad8d53-r0

Note: it doesn't seem to happen for the virgin gtk-sato-engine recipe, only when my patch is applied.

Quoted 8 lines

I discovered this when I tried building in an existing tree which had been built before the mentioned change to the fetch code. There were sstate files that used the long hash that the build seemed to want to use but got terribly confused and ended up creating empty packages, breaking my build. Trying to run 'cleansstate' on the failing packages did nothing as the code only cleans up based on the new hash and left the old files still there...

BTW, this caused such a mess in my build tree that I nearly had to start completely from scratch. I was able to recover only by very drastic measures - the following steps were used on more than a dozen packages that got confused:
find sstate-cache -name "*${PKG}*" -exec rm -fr \{} \; rm -fr tmp/stamps/*/${PKG}
bitbake ${PKG} -c cleansstate
rm -fr tmp/work/*/${PKG}
Anything less that this giant sledge-hammer and the confusion only continued. At least now I can build my images again...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------