[yocto] When are file checksums gathered from files, for tasks? During recipe parsing?

Martin Hundebøll mnhu at prevas.dk
Wed Nov 22 01:01:50 PST 2017


Hi Paul,

On 2017-11-22 09:10, Paul Knopf wrote:
> I have a recipe that depends on a deployed output from an image.
> 
> ----------------------------------------------------------
> SRC_URI += 
> "file://${DEPLOY_DIR_IMAGE}/my-image-${MACHINE}.wic.update.tar.gz;subdir=update"
> do_fetch[depends] += "my-image:do_build"
> ----------------------------------------------------------
> 
> Will the hash for "do_fetch" be computed after "my-image:do_build" is 
> executed?

The "dependency" hash is based on the hash of the my-image recipe, so 
that if you change the my-image.bb, then the hash of your dependent 
recipe changes too.

> If not, how would you propose I do something like this?

Don't put deployed images in SRC_URI, and don't put task dependencies in 
do_fetch, as that messes with do_fetchall, should you ever need to run that.

Look at what other recipes are doing when using images from 
DEPLOY_DIR_IMAGE. A reworked example from one of our recipes:

   do_image[depends] += "my-image:do_image_complete"

   IMAGE_PREPROCESS_COMMAND += "image_prepare"
   image_prepare() {
     install ${DEPLOY_DIR_IMAGE}/my-image-${MACHINE}.wic.update.tar.gz 
${IMAGE_ROOTFS}/
   }


I hope that helps!

// Martin



More information about the yocto mailing list