public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg-base: clean should not fail for recipes that were never built
@ 2019-09-24  9:27 Cedric Hombourger
  2019-09-24 11:25 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Cedric Hombourger @ 2019-09-24  9:27 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-24 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24  9:27 [PATCH] dpkg-base: clean should not fail for recipes that were never built Cedric Hombourger
2019-09-24 11:25 ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox