From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>,
Amanda Brindle <amanda.r.brindle@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/1] tinfoil.py: Check if BUILDDIR exists
Date: Mon, 22 Jan 2018 22:08:32 +0000 [thread overview]
Message-ID: <1516658912.24502.119.camel@linuxfoundation.org> (raw)
In-Reply-To: <6192920.y9QKLpEl5j@peggleto-mobl.ger.corp.intel.com>
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
next prev parent reply other threads:[~2018-01-22 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 20:52 [PATCH 0/1] tinfoil.py: Check if BUILDDIR exists Amanda Brindle
2018-01-19 20:53 ` [PATCH 1/1] " Amanda Brindle
2018-01-22 20:02 ` Paul Eggleton
2018-01-22 22:08 ` Richard Purdie [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-18 23:45 [PATCH 0/1] " Amanda Brindle
2018-01-18 23:45 ` [PATCH 1/1] " Amanda Brindle
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=1516658912.24502.119.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=amanda.r.brindle@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=paul.eggleton@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.