]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URI
authorAníbal Limón <anibal.limon@linux.intel.com>
Thu, 9 Jul 2015 23:15:43 +0000 (18:15 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 Jul 2015 21:53:22 +0000 (22:53 +0100)
Recipes that don't have SRC_URI means that don't use upstream sources
so returns 1.0.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/recipeutils.py

index ccec2a14447b6f3afa81a3fe673ff18151cdcd88..bd812ccbd1e9e609167ee1b45392c3c7b98a6b96 100644 (file)
@@ -667,8 +667,17 @@ def get_recipe_upstream_version(rd):
     ru['type'] = 'U'
     ru['datetime'] = ''
 
+    # XXX: If don't have SRC_URI means that don't have upstream sources so
+    # returns 1.0.
+    src_uris = rd.getVar('SRC_URI', True)
+    if not src_uris:
+        ru['version'] = '1.0'
+        ru['type'] = 'M'
+        ru['datetime'] = datetime.now()
+        return ru
+
     # XXX: we suppose that the first entry points to the upstream sources
-    src_uri = rd.getVar('SRC_URI', True).split()[0] 
+    src_uri = src_uris.split()[0]
     uri_type, _, _, _, _, _ =  decodeurl(src_uri)
 
     pv = rd.getVar('PV', True)