summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Klauer <daniel.klauer@gin.de>2020-06-30 13:38:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-30 23:03:02 +0100
commit62931865d5dc02b7f3029b85c7d76401acf2d8d8 (patch)
tree0d9ee415c5017c5f3deffff80bff70ca0340b130
parentacfda8e923fe73333da9353fc9cba8b35470a8ef (diff)
downloadpoky-62931865d5dc02b7f3029b85c7d76401acf2d8d8.tar.gz
deploy.bbclass: Clean DEPLOYDIR before do_deploy
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. (From OE-Core rev: 7083a7d56f4d90c81d2e6652ee291d20fd908bbe) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/deploy.bbclass1
-rw-r--r--meta/classes/kernel.bbclass2
-rw-r--r--meta/recipes-core/meta/signing-keys.bb2
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb1
4 files changed, 1 insertions, 5 deletions
diff --git a/meta/classes/deploy.bbclass b/meta/classes/deploy.bbclass
index 6d52908783..737c26122b 100644
--- a/meta/classes/deploy.bbclass
+++ b/meta/classes/deploy.bbclass
@@ -8,4 +8,5 @@ python do_deploy_setscene () {
8} 8}
9addtask do_deploy_setscene 9addtask do_deploy_setscene
10do_deploy[dirs] = "${DEPLOYDIR} ${B}" 10do_deploy[dirs] = "${DEPLOYDIR} ${B}"
11do_deploy[cleandirs] = "${DEPLOYDIR}"
11do_deploy[stamp-extra-info] = "${MACHINE_ARCH}" 12do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a1219f3156..301e3b86b2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -729,8 +729,6 @@ kernel_do_deploy() {
729 done 729 done
730 fi 730 fi
731} 731}
732do_deploy[cleandirs] = "${DEPLOYDIR}"
733do_deploy[dirs] = "${DEPLOYDIR} ${B}"
734do_deploy[prefuncs] += "package_get_auto_pr" 732do_deploy[prefuncs] += "package_get_auto_pr"
735 733
736addtask deploy after do_populate_sysroot do_packagedata 734addtask deploy after do_populate_sysroot do_packagedata
diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index 1e1c7e3459..5bab94aa36 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -67,8 +67,6 @@ do_deploy () {
67 fi 67 fi
68} 68}
69do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}" 69do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
70# cleandirs should possibly be in deploy.bbclass but we need it
71do_deploy[cleandirs] = "${DEPLOYDIR}"
72# clear stamp-extra-info since MACHINE_ARCH is normally put there by 70# clear stamp-extra-info since MACHINE_ARCH is normally put there by
73# deploy.bbclass 71# deploy.bbclass
74do_deploy[stamp-extra-info] = "" 72do_deploy[stamp-extra-info] = ""
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 7292ebbb77..84547630e8 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -220,7 +220,6 @@ do_deploy[depends] += "${DEPLOYDEP}"
220 220
221do_deploy() { 221do_deploy() {
222} 222}
223do_deploy[cleandirs] = "${DEPLOYDIR}"
224do_deploy_class-target() { 223do_deploy_class-target() {
225 # For use with "runqemu ovmf". 224 # For use with "runqemu ovmf".
226 for i in \ 225 for i in \