summaryrefslogtreecommitdiff
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-07-09 18:15:43 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-12 22:53:22 +0100
commit92f2481cf88e7b626cfe604134c9d020d06bd32c (patch)
tree6492035a7edd3e8b5ac7906f7e2432ca831c6a45 /meta/lib/oe
parentbebbcb10f467b40cc9a2fb64c824f2ef4142f7fe (diff)
downloadopenembedded-core-92f2481cf88e7b626cfe604134c9d020d06bd32c.tar.gz
openembedded-core-92f2481cf88e7b626cfe604134c9d020d06bd32c.tar.bz2
openembedded-core-92f2481cf88e7b626cfe604134c9d020d06bd32c.zip
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@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/recipeutils.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index ccec2a1444..bd812ccbd1 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)