public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH] dpkg-base: clean should not fail for recipes that were never built
Date: Tue, 24 Sep 2019 13:25:21 +0200	[thread overview]
Message-ID: <5cbceba2-bfd9-b7ec-eb19-a319b8953950@siemens.com> (raw)
In-Reply-To: <1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com>

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

      reply	other threads:[~2019-09-24 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  9:27 Cedric Hombourger
2019-09-24 11:25 ` Jan Kiszka [this message]

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=5cbceba2-bfd9-b7ec-eb19-a319b8953950@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=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