Skip to contentSkip to conversation

Image UNPACKDIR is being cleared

DISCUSSION Richard Greer 2 participants 2 messages Jan 28 – Jan 29

lore
Share & tools
lore
#0 lore raw

I am trying to build an image that built correctly for years up through our last supported Yocto release which was nanbield.

We are now trying to move to Walnascar (it is the latest release of other layers we pull in).

I changed things to account for the migration, including the move to UNPACKDIR, and now it does not build any more. The reason it fails is that UNPACKDIR (or S since they are the same) is getting cleared before our tasks can run after do_rootfs.

My image recipe has some proprietary git repos in SRC_URI to be put into the UNPACKDIR:

SRC_URI = " ${BRANE_GIT_IMAGE_BASE};branch=${BRANE_GIT_IMAGE_BRANCH};subpath=${BRANE_MIC_GIT_PATH};protocol=${BRANE_GIT_PROTOCOL};destsuffix=${BRANE_MIC_FOLDER};name=mic \
            ${BRANE_GIT_IMAGE_BASE};branch=${BRANE_GIT_IMAGE_BRANCH};subpath=${BRANE_IMAGE_VER_GIT_PATH};protocol=${BRANE_GIT_PROTOCOL};destsuffix=${BRANE_IMG_VER_FOLDER};name=imgver \
            ${BRANE_GIT_SOUND_BASE};branch=${BRANE_GIT_SOUND_BRANCH};protocol=${BRANE_GIT_PROTOCOL};lfs=0;destsuffix=${BRANE_SOUND_FOLDER};name=sound \
           "

BRANE_MIC_FOLDER = "mic-images"
BRANE_IMG_VER_FOLDER = "image-ver-git"
BRANE_SOUND_FOLDER = "sound"

S = "${WORKDIR}/brane_sources"
UNPACKDIR = "${S}"

If I run "bitbake -c unpack brane-image", the UNPACKDIR has everything in it as I would expect.

If I run "bitbake brane-image", I get an error in my do_brane_rootfs_changes task because it cannot find a file in the UNPACKDIR. When I go and look at the UNPACKDIR, it is now empty.

Here is my addtask line for that task:
addtask brane_rootfs_changes after do_rootfs do_unpack before do_image_tar

Here is the error:
| /home/gu/development/event/Image/yocto/speaker4-login-ssh-dev-cred-build/tmp/work/speaker4_ssh_dev_cred-poky-linux-gnueabi/brane-fsl-image/1.0/temp/run.do_brane_rootfs_changes.3187189: 1: cannot open /home/gu/development/event/Image/yocto/speaker4-login-ssh-dev-cred-build/tmp/work/speaker4_ssh_dev_cred-poky-linux-gnueabi/brane-fsl-image/1.0/brane_sources/image-ver-git/compat-version: No such file

That is ${UNPACKDIR}/${BRANE_IMG_VER_FOLDER}/compat-version, which as I said before exists if I just run up through do_unpack, but is gone when I try to run the complete recipe.

What is causing either S or UNPACKDIR to be cleared out after do_unpack but before my task can run after do_rootfs? Is it something to do with it being the image recipe which is treated differently?

Any help would be appreciated since we would like to move to a later version of Yocto.

Thanks,

Richard Greer

#1 lore raw
Quoted 3 lines · Richard Greer via lists.yoctoproject.org

What is causing either S or UNPACKDIR to be cleared out after do_unpack but before my task can run after do_rootfs? Is it something to do with it being the image recipe which is treated differently?

Any help would be appreciated since we would like to move to a later version of Yocto.

If you can provide a simple reproducer for latest master revision of poky/oe-core, you have a much higher chance of getting help. Otherwise you're inviting people to a guessing game in an uncommon scenario in a version of yocto that has been EOL for several months, all of which lowers your chances a lot.

Alex