All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] support/download: catch post-process errors
Date: Sun, 12 Feb 2023 09:39:57 +0100	[thread overview]
Message-ID: <87wn4nb7ky.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20230210223143.1060114-1-yann.morin.1998@free.fr> (Yann E. MORIN's message of "Fri, 10 Feb 2023 23:31:42 +0100")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Currently, when the post-process helper fails while downloading from
 > upstream, there is no fallback to the backup mirror.

 > In case the post-process helper fails, we mut consider that to be a
 > download failure, so we must bail out as if the download backend itself
 > did fail, but we fail to do so.

 > Duplicate the logic we have for the download helper: if the post-process
 > helper fails, remove the downloaded stuff, and continue on to the next
 > URI, which will ultimately hit the backup mirror (if one has been
 > configured).

 > Reported-by: Peter Korsgaard <peter@korsgaard.com>
 > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed after adding a fixes:
http://autobuild.buildroot.net/results/12a/12a63ae177fe3ed0c9a1ef2fa01870f334f36b0f/,
thanks!

> ---
 >  support/download/dl-wrapper | 12 +++++++++---
 >  1 file changed, 9 insertions(+), 3 deletions(-)

 > diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper
 > index 09a6ac1f1a..1e8d6058f6 100755
 > --- a/support/download/dl-wrapper
 > +++ b/support/download/dl-wrapper
 > @@ -138,9 +138,15 @@ main() {
 >          fi
 
 >          if [ -n "${post_process}" ] ; then
 > -            "${OLDPWD}/support/download/${post_process}-post-process" \
 > -                -o "${tmpf}" \
 > -                -n "${raw_base_name}"
 > +            if ! "${OLDPWD}/support/download/${post_process}-post-process" \
 > +                    -o "${tmpf}" \
 > +                    -n "${raw_base_name}"
 > +            then
 > +                # cd back to keep path coherence
 > +                cd "${OLDPWD}"
 > +                rm -rf "${tmpd}"
 > +                continue
 > +            fi
 >          fi
 
 >          # cd back to free the temp-dir, so we can remove it later
 > -- 

 > 2.25.1


-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-02-12  8:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 22:31 [Buildroot] [PATCH 1/2] support/download: catch post-process errors Yann E. MORIN
2023-02-10 22:31 ` [Buildroot] [PATCH 2/2] support/download: fix the cargo post-process in face of failed vendoring Yann E. MORIN
2023-02-12  8:45   ` Peter Korsgaard
2023-02-12  8:39 ` Peter Korsgaard [this message]
2023-02-28 21:13 ` [Buildroot] [PATCH 1/2] support/download: catch post-process errors Peter Korsgaard

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=87wn4nb7ky.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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.