* [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
* Re: [PATCH] dpkg-base: clean should not fail for recipes that were never built
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
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2019-09-24 11:25 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
On 24.09.19 11:27, Cedric Hombourger wrote:
> 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} )
>
That was basically v1 of my patch. We now have v2 queued [1].
BTW, test feedback on [2] is always appreciated!
Jan
[1]
https://groups.google.com/d/msgid/isar-users/5820c57407b213762f4979a4b8070f9cb8eac681.1569176231.git.jan.kiszka%40siemens.com
[2]
https://groups.google.com/d/msgid/isar-users/706182d3-eda9-2bbc-f8d0-722c787efddb%40siemens.com
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ 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