From: Daniel Klauer <daniel.klauer@gin.de>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 2/2] deploy.bbclass: Clean DEPLOYDIR before do_deploy
Date: Wed, 28 Aug 2019 13:41:31 +0200 [thread overview]
Message-ID: <20190828114131.10340-2-daniel.klauer@gin.de> (raw)
In-Reply-To: <20190828114131.10340-1-daniel.klauer@gin.de>
It seems convenient for do_deploy to clean up ${DEPLOYDIR} (its output
directory) before running, just like do_install cleans up ${D} before
running. This way we can be sure that a recipe's do_deploy output is not
accidentally contaminated by previously existing files in DEPLOYDIR in
case of incremental builds.
All recipes using deploy.bbclass (grep -r 'inherit .*deploy') in poky,
meta-openembedded and meta-freescale look to me 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.
I tested this by running "bitbake virtual/kernel u-boot":
1. on patched, but clean poky source tree
2. after adding "touch ${DEPLOYDIR}/foo-${PN}" to linux-yocto's/u-boot's
do_deploy, to manually trigger an incremental build of do_deploy only.
3. after removing the modifications again.
The foo-${PN} files existed in tmp/deploy/images/qemux86-64 after step 2,
and not anymore after step 3, as expected. Thus the cleandirs still works.
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
---
meta/classes/deploy.bbclass | 1 +
meta/classes/kernel.bbclass | 2 --
meta/recipes-core/meta/signing-keys.bb | 2 --
meta/recipes-core/ovmf/ovmf_git.bb | 1 -
4 files changed, 1 insertion(+), 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 () {
}
addtask do_deploy_setscene
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
+do_deploy[cleandirs] = "${DEPLOYDIR}"
do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index bf3674238f..aa339ace7e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -706,8 +706,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
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 () {
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] = ""
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index b569b593fc..2c804381ee 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -223,7 +223,6 @@ do_deploy[depends] += "${DEPLOYDEP}"
do_deploy() {
}
-do_deploy[cleandirs] = "${DEPLOYDIR}"
do_deploy_class-target() {
# For use with "runqemu ovmf".
for i in \
--
2.17.1
next prev parent reply other threads:[~2019-08-28 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 11:41 [PATCH 1/2] uboot-sign: Refactor do_deploy prefunc to do_deploy_prepend Daniel Klauer
2019-08-28 11:41 ` Daniel Klauer [this message]
2020-06-26 12:38 ` [PATCH 2/2] deploy.bbclass: Clean DEPLOYDIR before do_deploy Daniel Klauer
2019-08-28 14:01 ` [PATCH 1/2] uboot-sign: Refactor do_deploy prefunc to do_deploy_prepend Richard Purdie
2019-08-29 9:05 ` Daniel Klauer
2019-08-29 13:00 ` richard.purdie
2019-08-29 15:31 ` [PATCH v2 " Daniel Klauer
-- strict thread matches above, loose matches on Subject: below --
2020-06-30 11:38 [PATCH " Daniel Klauer
2020-06-30 11:38 ` [PATCH 2/2] deploy.bbclass: Clean DEPLOYDIR before do_deploy Daniel Klauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190828114131.10340-2-daniel.klauer@gin.de \
--to=daniel.klauer@gin.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.