From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
To: <isar-users@googlegroups.com>
Cc: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Subject: [PATCH] dpkg-base: clean should not fail for recipes that were never built
Date: Tue, 24 Sep 2019 11:27:22 +0200 [thread overview]
Message-ID: <1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com> (raw)
Running bitbake -c clean <recipe> will fail on the find command and print
error messages to the console if the work directory does not exist (e.g.
if the recipe was never built). Silent errors from the find command
and ignore any failures (the list of .deb will be expanded to the empty
string and the clean command will then do nothing (as expected)).
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/dpkg-base.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index b336cc6..019ae77 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -100,7 +100,7 @@ do_build() {
CLEANFUNCS += "repo_clean"
repo_clean() {
- DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" )
+ DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" 2>/dev/null || true )
if [ -n "${DEBS}" ]; then
for d in ${DEBS}; do
p=$( dpkg-deb --show --showformat '${Package}' ${d} )
--
2.11.0
next reply other threads:[~2019-09-24 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 9:27 Cedric Hombourger [this message]
2019-09-24 11:25 ` Jan Kiszka
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=1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com \
--to=cedric_hombourger@mentor.com \
--cc=isar-users@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox