Bug 12693 - Task added after do_deploy not cached
Summary: Task added after do_deploy not cached
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4
Hardware: x86 arm64
: Medium normal
Target Milestone: 4.99
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-04-17 17:12 UTC by Jonathan Richardson
Modified: 2018-04-19 14:35 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Richardson 2018-04-17 17:12:32 UTC
In my u-boot recipe I have the following:

require recipes-bsp/u-boot/u-boot.inc

python () {
    if (d.getVar('SOMEVAR', True) == 'true':
        bb.build.addtask('do_signing', 'do_build', 'do_deploy', d)
}

do_signing() {
    # Do something with ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}
}

If I build the recipe do_signing gets run after do_deploy properly. If I do a bitbake myrecipe -c cleanall, then bitbake brcm-myrecipe, do_signing is run even though the setscene version of all the tasks is run. If do_deploy_setscene is run shouldn't do_signing which depends on it be ignored since it's cached? 

do_package_write_rpm_setscene (191480): log.do_package_write_rpm_setscene.191480
do_package_qa_setscene (192008): log.do_package_qa_setscene.192008
do_populate_sysroot_setscene (193016): log.do_populate_sysroot_setscene.193016
do_populate_lic_setscene (193164): log.do_populate_lic_setscene.193164
do_deploy_setscene (193310): log.do_deploy_setscene.193310
do_packagedata_setscene (195065): log.do_packagedata_setscene.195065
do_signing (69150): log.do_signing.69150
Comment 1 Ross Burton 2018-04-19 14:35:01 UTC
sstate is opt-in, if your task doesn't put anything into the cache then it can't be restored either.

If you want your recipe to use sstate then look up sstate-inputdirs and sstate-outputdirs in the manual and other classes in oe-core.