diff mbox series

[v3,07/18] binman: Keep the efi_capsule input file

Message ID 20240620230625.1797397-8-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series Bug-fixes for a few boards | expand

Commit Message

Simon Glass June 20, 2024, 11:06 p.m. UTC
There is no need to remove input files. It makes it harder to diagnose
failures. Keep the payload file.

There is no test for this condition, but one could be added.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: b617611b27a ("binman: capsule: Add support for generating...")
---

(no changes since v1)

 tools/binman/etype/efi_capsule.py | 1 -
 1 file changed, 1 deletion(-)

Comments

Sughosh Ganu June 21, 2024, 6:14 a.m. UTC | #1
On Fri, 21 Jun 2024 at 04:36, Simon Glass <sjg@chromium.org> wrote:
>
> There is no need to remove input files. It makes it harder to diagnose
> failures. Keep the payload file.
>
> There is no test for this condition, but one could be added.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Fixes: b617611b27a ("binman: capsule: Add support for generating...")
> ---

Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>

Although I don't think this warrants a Fixes tag. It is not fixing any
issue as such.

-sughosh

>
> (no changes since v1)
>
>  tools/binman/etype/efi_capsule.py | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py
> index 47da5da324b..03e55cbc4d9 100644
> --- a/tools/binman/etype/efi_capsule.py
> +++ b/tools/binman/etype/efi_capsule.py
> @@ -148,7 +148,6 @@ class Entry_efi_capsule(Entry_section):
>                                                   self.fw_version,
>                                                   self.oem_flags)
>          if ret is not None:
> -            os.remove(payload)
>              return tools.read_file(capsule_fname)
>          else:
>              # Bintool is missing; just use the input data as the output
> --
> 2.34.1
>
Simon Glass June 21, 2024, 2:57 p.m. UTC | #2
Hi Sughosh,

On Fri, 21 Jun 2024 at 00:14, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> On Fri, 21 Jun 2024 at 04:36, Simon Glass <sjg@chromium.org> wrote:
> >
> > There is no need to remove input files. It makes it harder to diagnose
> > failures. Keep the payload file.
> >
> > There is no test for this condition, but one could be added.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > Fixes: b617611b27a ("binman: capsule: Add support for generating...")
> > ---
>
> Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
>
> Although I don't think this warrants a Fixes tag. It is not fixing any
> issue as such.

I'm OK to drop it if you like. Binman is designed to keep its
intermittent files in the output dir. We have talked about having a
separate dir for 'intermediate' files to avoid cluttering the output
dir, but have not done this yet.

Regards,
Simon


>
> -sughosh
>
> >
> > (no changes since v1)
> >
> >  tools/binman/etype/efi_capsule.py | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py
> > index 47da5da324b..03e55cbc4d9 100644
> > --- a/tools/binman/etype/efi_capsule.py
> > +++ b/tools/binman/etype/efi_capsule.py
> > @@ -148,7 +148,6 @@ class Entry_efi_capsule(Entry_section):
> >                                                   self.fw_version,
> >                                                   self.oem_flags)
> >          if ret is not None:
> > -            os.remove(payload)
> >              return tools.read_file(capsule_fname)
> >          else:
> >              # Bintool is missing; just use the input data as the output
> > --
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py
index 47da5da324b..03e55cbc4d9 100644
--- a/tools/binman/etype/efi_capsule.py
+++ b/tools/binman/etype/efi_capsule.py
@@ -148,7 +148,6 @@  class Entry_efi_capsule(Entry_section):
                                                  self.fw_version,
                                                  self.oem_flags)
         if ret is not None:
-            os.remove(payload)
             return tools.read_file(capsule_fname)
         else:
             # Bintool is missing; just use the input data as the output