[PATCH 2/5] binman: Show an error when a file is missing

Simon Glass sjg at chromium.org
Mon Sep 7 03:43:39 CEST 2020


Hi Andy,

On Fri, 4 Sep 2020 at 03:33, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
>
> On Thu, Sep 03, 2020 at 07:28:53PM -0600, Simon Glass wrote:
> > The recent support for missing external binaries does not show an error
> > message when a file is genuinely missing (i.e. it is missing but not
> > marked as 'external'). This means that when -m is passed to binman, it
> > will never report a missing file.
> >
> > Fix this and add a test.
>
> Acked-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
>
> One note below.
>
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  tools/binman/etype/blob.py             |  7 ++++---
> >  tools/binman/ftest.py                  |  7 +++++++
> >  tools/binman/test/173_missing_blob.dts | 14 ++++++++++++++
> >  3 files changed, 25 insertions(+), 3 deletions(-)
> >  create mode 100644 tools/binman/test/173_missing_blob.dts
> >
> > diff --git a/tools/binman/etype/blob.py b/tools/binman/etype/blob.py
> > index c5f97c85a38..66cf243976e 100644
> > --- a/tools/binman/etype/blob.py
> > +++ b/tools/binman/etype/blob.py
> > @@ -37,13 +37,14 @@ class Entry_blob(Entry):
> >
> >      def ObtainContents(self):
> >          self._filename = self.GetDefaultFilename()
> > -        self._pathname = tools.GetInputFilename(self._filename,
> > -                                                self.section.GetAllowMissing())
> > +        self._pathname = tools.GetInputFilename(
> > +            self._filename, self.external and self.section.GetAllowMissing())
>
> I hope you know that 'and' has a bit different semantics in Python than in C for example.

I think I understand it, in the sense that 'x and y' returns y if x is
true. Is that what you mean?

> And why to move first parameter to new line?

I think the style is to either line up the params agained the '(' or
indented 4 from the start of the line. I'll flip it back as pylint3
doesn't seem to mind either way.

Regards,
Simon


More information about the U-Boot mailing list