]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipeutils.py: don't hardcode the upstream version as 1.0 when SRC_URI is empty...
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Fri, 25 Sep 2015 11:41:37 +0000 (14:41 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Sep 2015 10:58:25 +0000 (11:58 +0100)
Instead, simply return the version of the recipe, so that the upstream
version checker will declare that they match.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/recipeutils.py

index 35b88d386cbeff3c7f3375f215e2c78ce668c9c4..5fd5dcba98f2d34775403e4a074cfe3c8289df90 100644 (file)
@@ -732,11 +732,14 @@ def get_recipe_upstream_version(rd):
     ru['type'] = 'U'
     ru['datetime'] = ''
 
+    pv = rd.getVar('PV', True)
+
     # XXX: If don't have SRC_URI means that don't have upstream sources so
-    # returns 1.0.
+    # returns the current recipe version, so that upstream version check
+    # declares a match.
     src_uris = rd.getVar('SRC_URI', True)
     if not src_uris:
-        ru['version'] = '1.0'
+        ru['version'] = pv
         ru['type'] = 'M'
         ru['datetime'] = datetime.now()
         return ru
@@ -745,8 +748,6 @@ def get_recipe_upstream_version(rd):
     src_uri = src_uris.split()[0]
     uri_type, _, _, _, _, _ =  decodeurl(src_uri)
 
-    pv = rd.getVar('PV', True)
-
     manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION", True)
     if manual_upstream_version:
         # manual tracking of upstream version.