]> code.ossystems Code Review - openembedded-core.git/commitdiff
distrodata: handle recipes with empty or absent SRC_URI in checkpkg()
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Fri, 25 Sep 2015 11:41:36 +0000 (14:41 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Sep 2015 10:58:26 +0000 (11:58 +0100)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/distrodata.bbclass

index 4168e43849f2a4fd1a3390a99a04c1b997a52c1f..e6eb3f32b303c7ad6690b8f4b0a6bd66d8b908c0 100644 (file)
@@ -272,9 +272,10 @@ python do_checkpkg() {
 
         """first check whether a uri is provided"""
         src_uri = d.getVar('SRC_URI', True)
-        if not src_uri:
-                return
-        uri_type, _, _, _, _, _ = decodeurl(src_uri)
+        if src_uri:
+            uri_type, _, _, _, _, _ = decodeurl(src_uri)
+        else:
+            uri_type = "none"
 
         """initialize log files."""
         logpath = d.getVar('LOG_DIR', True)
@@ -354,7 +355,10 @@ python do_checkpkg() {
             elif cmp == 0:
                 pstatus = "MATCH"
 
-        psrcuri = psrcuri.split()[0]
+        if psrcuri:
+            psrcuri = psrcuri.split()[0]
+        else:
+            psrcuri = "none"
         pdepends = "".join(pdepends.split("\t"))
         pdesc = "".join(pdesc.split("\t"))
         no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True)