[oe-commits] =?UTF-8?Q?An=C3=ADbal=20Lim=C3=B3n=20?=: oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URI

git at git.openembedded.org git at git.openembedded.org
Sun Jul 12 21:51:09 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: f457d2b3c0e9e261f4cd1e2a2eb4621a27db36d5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f457d2b3c0e9e261f4cd1e2a2eb4621a27db36d5

Author: Aníbal Limón <anibal.limon at linux.intel.com>
Date:   Thu Jul  9 18:15:43 2015 -0500

oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URI

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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/recipeutils.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index ccec2a1..bd812cc 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -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)



More information about the Openembedded-commits mailing list