]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/base: get_lic_checksum_file_list imporve validaton of url's
authorAníbal Limón <anibal.limon@linux.intel.com>
Wed, 11 May 2016 16:41:55 +0000 (11:41 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 29 Jun 2016 18:34:43 +0000 (19:34 +0100)
When specify an URL different that supported file:// the function
returns an empty path causing an exception without notice the user
that the URL is Malformed.

[YOCTO #9211]

(From OE-Core rev: 6c28251d3d187b60ceb534055dbd8b4fffd06429)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/classes/base.bbclass

index a7ca3a6676b2e0433559a285820c40ac84761710..c3c2669939c6f0b9080727378a26a324072d7e51 100644 (file)
@@ -105,6 +105,9 @@ def get_lic_checksum_file_list(d):
         # any others should be covered by SRC_URI.
         try:
             path = bb.fetch.decodeurl(url)[2]
+            if not path:
+                raise bb.fetch.MalformedUrl(url)
+
             if path[0] == '/':
                 if path.startswith(tmpdir):
                     continue