diff options
author | Ross Burton <ross.burton@intel.com> | 2018-08-13 18:20:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-14 11:36:22 +0100 |
commit | e2b8a3d5a10868f9c0dec8d7b9f5f89fdd100fc8 (patch) | |
tree | d3867ae1b7364484878802064d022360c057e7e2 /meta/classes/license.bbclass | |
parent | 9e291d9923efc988abe8689c64bafbb29da06339 (diff) | |
download | openembedded-core-contrib-e2b8a3d5a10868f9c0dec8d7b9f5f89fdd100fc8.tar.gz |
classes: sanity-check LIC_FILES_CHKSUM
We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this,
which can lead to problems if you have a URI that resolves to a path of / as
Bitbake will then dutifully checksum / recursively.
[ YOCTO #12883 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 2ac15a1bc89..4cf7f074fc2 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -205,7 +205,9 @@ def find_license_files(d): for url in lic_files.split(): try: - (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) + (method, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) + if method != "file" or not path: + raise bb.fetch.MalformedUrl() except bb.fetch.MalformedUrl: bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF'), url)) # We want the license filename and path |