[PATCH v2 1/2] binman: Do not pollute source tree when build with `make O=...`

Andy Shevchenko andy.shevchenko at gmail.com
Fri Dec 3 21:29:09 CET 2021


On Fri, Dec 03, 2021 at 01:13:12PM -0700, Simon Glass wrote:
> On Fri, 3 Dec 2021 at 00:55, Andy Shevchenko <andy.shevchenko at gmail.com> wrote:
> > On Friday, December 3, 2021, Simon Glass <sjg at chromium.org> wrote:
> >> On Tue, 30 Nov 2021 at 12:04, Andy Shevchenko
> >> <andriy.shevchenko at linux.intel.com> wrote:

...

> >> This look useful, but we cannot rely on 'srcdir' being in the
> >> environment.
> >
> > True and code is aware of that. Nothing needs to be fixed.
> 
> What am I missing?
> 
> $ binman test
> Traceback (most recent call last):
>   File "/home/sglass/bin/binman", line 23, in <module>
>     srctree = os.environ['srctree']
>   File "/usr/lib/python3.8/os.py", line 675, in __getitem__
>     raise KeyError(key) from None
> KeyError: 'srctree'

I see, you mean that you run it when it's not in build tree?

> >> For example, most binman development is done just by
> >> running 'binman test' in the source tre. So perhaps default to the
> >> current directory is 'srcdir' is not set?

Ah, you mean you run it manually and not via `make`.

	os.environ.get('srctree', '')

should help I suppose.

P.S. What is the 'srcdir' you are referring to all the time?

-- 
With Best Regards,
Andy Shevchenko




More information about the U-Boot mailing list