insane, license: Trap MalformedUrl exceptions when parsing LIC_FILES_CHKSUM
authorPhil Blundell <pb@pbcl.net>
Tue, 12 Nov 2013 13:29:24 +0000 (13:29 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Nov 2013 16:00:30 +0000 (16:00 +0000)
commitf0d3ef6ed705b58359dbb6ee22b0eaa42c101dff
tree2b84d20861c43013197448c81ddad7a1a12a87ce
parent28abc967642a52467ed6e53a4d0c600383c23d3f
insane, license: Trap MalformedUrl exceptions when parsing LIC_FILES_CHKSUM

bb.fetch.decodeurl() will throw if it doesn't like the look of the URL that
it's given.  (Bitbake's idea of what constitutes a valid URL is somewhat
idiosyncratic so it is fairly easy to trip over this by mistake when writing
a recipe.)

If these exceptions are allowed to propagate all the way up to better_exec()
then we will get a large amount of python stack trace spew when they are
finally caught.  Avoid that by catching them locally and throwing
bb.build.FuncFailed() with a suitable explanation instead.

(From OE-Core rev: ef35e164c62d89806367b822e3baeff482ec237f)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass
meta/classes/license.bbclass