[bitbake-devel] [PATCH 1/1] tinfoil.py: Check if BUILDDIR exists
Richard Purdie
richard.purdie at linuxfoundation.org
Mon Jan 22 22:08:32 UTC 2018
On Tue, 2018-01-23 at 09:02 +1300, Paul Eggleton wrote:
> Hi Amanda,
>
> On Saturday, 20 January 2018 9:53:13 AM NZDT Amanda Brindle wrote:
> >
> > + basepath = os.environ.get('BUILDDIR')
> > + if not basepath:
> > + print("Tinfoil can only be run after initialising the
> > build
> > environment (e.g. by using oe-init-build-env)")
> > + sys.exit(1)
> > +
> We should be raising an exception here - tinfoil is utility code, it
> shouldn't
> be calling sys.exit(). Additionally, bitbake shouldn't be referring
> to
> oe-init-build-env, that's something from OpenEmbedded; even
> mentioning Tinfoil
> isn't going to be much use to the user. I would simply raise a
> custom
> exception class with the message "Build environment not initialised"
> or
> similar, and if tinfoil-using want to catch that exception and
> produce a more
> friendly message they can fairly easily do so.
This was also triggering on the autobuilder tests so something isn't
quite right here:
https://autobuilder.yocto.io/builders/nightly-x86-64/builds/744/steps/Running%20ESDK%20Sanity%20Tests/logs/stdio
Cheers,
Richard
More information about the bitbake-devel
mailing list