]> code.ossystems Code Review - openembedded-core.git/commitdiff
deploy.bbclass: Clean DEPLOYDIR before do_deploy
authorDaniel Klauer <daniel.klauer@gin.de>
Tue, 30 Jun 2020 11:38:54 +0000 (13:38 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Jun 2020 22:02:11 +0000 (23:02 +0100)
do_deploy should clean up ${DEPLOYDIR} before running, just like do_install
cleans up ${D} before running. This reduces the risk of DEPLOYDIR being
accidentally contaminated by files from previous runs, possibly even with
different config, in case of incremental builds.

It is convenient to have this in deploy.bbclass, so it doesn't have to be
duplicated in every recipe, considering for example meta-freescale, which
has 23 affected recipes.

All recipes using deploy.bbclass (grep -r 'inherit .*deploy') in poky,
meta-openembedded and meta-freescale look like they either benefit from
this or are at least not affected negatively by it. The only exception
I've noticed was uboot-sign.bbclass, which was however fixed by the
previous patch.

Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/deploy.bbclass
meta/classes/kernel.bbclass
meta/recipes-core/meta/signing-keys.bb
meta/recipes-core/ovmf/ovmf_git.bb

index 6d52908783d8197d20f840eed5b5d1135d81492c..737c26122b0d045cd9738dc7ffe9e3fabba355ae 100644 (file)
@@ -8,4 +8,5 @@ python do_deploy_setscene () {
 }
 addtask do_deploy_setscene
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
+do_deploy[cleandirs] = "${DEPLOYDIR}"
 do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
index a1219f3156205bd324cdacd93df073b36e265f0c..301e3b86b29f1bb9aa98dc34bf162f43997050a1 100644 (file)
@@ -729,8 +729,6 @@ kernel_do_deploy() {
                done
        fi
 }
-do_deploy[cleandirs] = "${DEPLOYDIR}"
-do_deploy[dirs] = "${DEPLOYDIR} ${B}"
 do_deploy[prefuncs] += "package_get_auto_pr"
 
 addtask deploy after do_populate_sysroot do_packagedata
index 1e1c7e3459d61329dbbb5019a65490df99804ef9..5bab94aa369466f9bcc435c63e76c2b41d3e6fc3 100644 (file)
@@ -67,8 +67,6 @@ do_deploy () {
     fi
 }
 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
-# cleandirs should possibly be in deploy.bbclass but we need it
-do_deploy[cleandirs] = "${DEPLOYDIR}"
 # clear stamp-extra-info since MACHINE_ARCH is normally put there by
 # deploy.bbclass
 do_deploy[stamp-extra-info] = ""
index 7292ebbb775e8a27aaf8d4848f3c7b847aeee180..84547630e8f9926fd21c4d76b83ad876b123755f 100644 (file)
@@ -220,7 +220,6 @@ do_deploy[depends] += "${DEPLOYDEP}"
 
 do_deploy() {
 }
-do_deploy[cleandirs] = "${DEPLOYDIR}"
 do_deploy_class-target() {
     # For use with "runqemu ovmf".
     for i in \