[oe-commits] Alexander Kanavin : recipeutils.py: don' t hardcode the upstream version as 1.0 when SRC_URI is empty or absent
git at git.openembedded.org
git at git.openembedded.org
Sat Sep 26 17:14:30 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: c3a33207f0b9683ab8ffe0d95d169f8e49f39dab
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c3a33207f0b9683ab8ffe0d95d169f8e49f39dab
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
Date: Fri Sep 25 14:41:37 2015 +0300
recipeutils.py: don't hardcode the upstream version as 1.0 when SRC_URI is empty or absent
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 at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oe/recipeutils.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 35b88d3..5fd5dcb 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -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.
More information about the Openembedded-commits
mailing list