diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-09-25 14:41:37 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-28 12:00:24 +0100 |
commit | 5cc44fe4fd94dcdab06d5cc0b2fd4205ed981482 (patch) | |
tree | 2f663f8fee78f84a63254e1bb55a1022358418cb /meta/lib/oe | |
parent | 320500e38e6ca64e5d5be8eb7ef74a3ea6bc2ed5 (diff) | |
download | poky-5cc44fe4fd94dcdab06d5cc0b2fd4205ed981482.tar.gz |
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.
(From OE-Core rev: 10c948a67546dd4ed2ac00b5210ef4b3eeca9401)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 35b88d386c..5fd5dcba98 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -732,11 +732,14 @@ def get_recipe_upstream_version(rd): | |||
732 | ru['type'] = 'U' | 732 | ru['type'] = 'U' |
733 | ru['datetime'] = '' | 733 | ru['datetime'] = '' |
734 | 734 | ||
735 | pv = rd.getVar('PV', True) | ||
736 | |||
735 | # XXX: If don't have SRC_URI means that don't have upstream sources so | 737 | # XXX: If don't have SRC_URI means that don't have upstream sources so |
736 | # returns 1.0. | 738 | # returns the current recipe version, so that upstream version check |
739 | # declares a match. | ||
737 | src_uris = rd.getVar('SRC_URI', True) | 740 | src_uris = rd.getVar('SRC_URI', True) |
738 | if not src_uris: | 741 | if not src_uris: |
739 | ru['version'] = '1.0' | 742 | ru['version'] = pv |
740 | ru['type'] = 'M' | 743 | ru['type'] = 'M' |
741 | ru['datetime'] = datetime.now() | 744 | ru['datetime'] = datetime.now() |
742 | return ru | 745 | return ru |
@@ -745,8 +748,6 @@ def get_recipe_upstream_version(rd): | |||
745 | src_uri = src_uris.split()[0] | 748 | src_uri = src_uris.split()[0] |
746 | uri_type, _, _, _, _, _ = decodeurl(src_uri) | 749 | uri_type, _, _, _, _, _ = decodeurl(src_uri) |
747 | 750 | ||
748 | pv = rd.getVar('PV', True) | ||
749 | |||
750 | manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION", True) | 751 | manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION", True) |
751 | if manual_upstream_version: | 752 | if manual_upstream_version: |
752 | # manual tracking of upstream version. | 753 | # manual tracking of upstream version. |