summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/insane.bbclass5
-rw-r--r--meta/classes/license.bbclass5
2 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index eb440c24ff..3558dee1b0 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -594,7 +594,10 @@ def package_qa_check_license(workdir, d):
594 srcdir = d.getVar('S', True) 594 srcdir = d.getVar('S', True)
595 595
596 for url in lic_files.split(): 596 for url in lic_files.split():
597 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) 597 try:
598 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
599 except bb.fetch.MalformedUrl:
600 raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
598 srclicfile = os.path.join(srcdir, path) 601 srclicfile = os.path.join(srcdir, path)
599 if not os.path.isfile(srclicfile): 602 if not os.path.isfile(srclicfile):
600 raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile) 603 raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 6abdae4e84..1c1b679fac 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -228,7 +228,10 @@ def find_license_files(d):
228 return lic_files_paths 228 return lic_files_paths
229 229
230 for url in lic_files.split(): 230 for url in lic_files.split():
231 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) 231 try:
232 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
233 except bb.fetch.MalformedUrl:
234 raise bb.build.FuncFailed("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF', True), url))
232 # We want the license filename and path 235 # We want the license filename and path
233 srclicfile = os.path.join(srcdir, path) 236 srclicfile = os.path.join(srcdir, path)
234 lic_files_paths.append((os.path.basename(path), srclicfile)) 237 lic_files_paths.append((os.path.basename(path), srclicfile))