U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: "u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 1/2] binman: Do not pollute source tree when build with `make O=...`
Date: Fri, 3 Dec 2021 22:29:09 +0200	[thread overview]
Message-ID: <Yap+FUsfDm6gMho1@smile.fi.intel.com> (raw)
In-Reply-To: <CAPnjgZ3ikJRg9WW-Ees9-k4nJhg76VWU41yWfkXOrT5rgxPSvw@mail.gmail.com>

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@gmail.com> wrote:
> > On Friday, December 3, 2021, Simon Glass <sjg@chromium.org> wrote:
> >> On Tue, 30 Nov 2021 at 12:04, Andy Shevchenko
> >> <andriy.shevchenko@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



  reply	other threads:[~2021-12-03 20:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 19:04 [PATCH v2 1/2] binman: Do not pollute source tree when build with `make O=...` Andy Shevchenko
2021-11-30 19:04 ` [PATCH v2 2/2] binman: Use less hard coded magic when inserting new PATH Andy Shevchenko
2021-12-03  3:31   ` Simon Glass
2021-12-03  3:31 ` [PATCH v2 1/2] binman: Do not pollute source tree when build with `make O=...` Simon Glass
2021-12-03  7:55   ` Andy Shevchenko
2021-12-03 20:13     ` Simon Glass
2021-12-03 20:29       ` Andy Shevchenko [this message]
2021-12-06 10:43         ` Andy Shevchenko

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=Yap+FUsfDm6gMho1@smile.fi.intel.com \
    --to=andy.shevchenko@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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