Hi all,
[Go to paragraph surrounded by # if in a hurry]
The company I work for is using Yocto (customized version of dylan).
We recently faced a little problem with bitbake and my google-fu
seems to be insufficient to solve it.
I know that when SRC_URI of a recipe is changed, the MD5 and SHA
sums will have to be updated. If not, bitbake will fail with a very
verbose error telling exactly what are the new checksums so I can
easily update them in the recipe.
I also know that a tarball of a recipe might change on a server
without having its version changed. This is a very bad practice but
when this happen we are dealing with it.
No, the problem we're having is not about these well documented
cases. The problem is about rotten bits.
You see, we have a recipe (let's call it foo) that need to be build
from scratch. Bitbake will do_fetch() it, and verify the checksums.
Everything's fine, the tarball is saved in the yocto's downloads
folder. Bitbake then do_unpack() the tarball and starts building in
the tmp directory. Marvellous. The build succeeds and everybody is
happy.
Then, say I want to rebuild a yocto image after having modified a
recipe (bar). bar is needed by foo, so foo will have to be rebuilt.
No problem everything is fine. foo is not redownloaded since it's
already in downloads. there's a do_unpack() and so on.
Here's the problem. A week later, I modify bar again, so foo will
need to be rebuilt. A bit on the hard drive flipped so the checksum
of foo's tarball does not match anymore. Apparently and from what I
read, Bitbake's do_unpack does not verify the checksum as it's only
validated during do_fetch. Building and installing foo succeeds
though as the rotten bit only affects runtime. The image is created
like no problem occured and we install the image. Then there's the
crash, we search a lot and finally find the issue. A simple -c
cleanall foo and the problem will disappear.
#
Now, my question : Would it be hard to bitbake's contributors to add
a checksum validation during the do_unpack step? Hard-drive errors
like this can occur, and such above-mentionned pain would be so
easily avoided by a quick checksum...
#
Many thanks.
Lee
P.S.: "
If I had more time, I would have written a shorter letter"