diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-08-25 12:41:57 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-30 09:56:12 +0100 |
commit | d3e4f25993cc784efc61c69a9c25daf5f89102bb (patch) | |
tree | fe76adfe92549adaf13643ef49345ef154265697 | |
parent | b6469ed7d6fbc9950f1719987102a432febc1cee (diff) | |
download | poky-d3e4f25993cc784efc61c69a9c25daf5f89102bb.tar.gz |
lib/oe/recipeutils.py: accommodate SRCPV being optional and deprecated in version check regex
(From OE-Core rev: 84794b59940cb08ec44e5ee7718a464d24136812)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oe/recipeutils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 6996e426ec..3336db8ab0 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -945,10 +945,9 @@ def replace_dir_vars(path, d): | |||
945 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) | 945 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) |
946 | return path | 946 | return path |
947 | 947 | ||
948 | def get_recipe_pv_without_srcpv(pv, uri_type): | 948 | def get_recipe_pv_with_pfx_sfx(pv, uri_type): |
949 | """ | 949 | """ |
950 | Get PV without SRCPV common in SCM's for now only | 950 | Get PV separating prefix and suffix components. |
951 | support git. | ||
952 | 951 | ||
953 | Returns tuple with pv, prefix and suffix. | 952 | Returns tuple with pv, prefix and suffix. |
954 | """ | 953 | """ |
@@ -956,7 +955,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): | |||
956 | sfx = '' | 955 | sfx = '' |
957 | 956 | ||
958 | if uri_type == 'git': | 957 | if uri_type == 'git': |
959 | git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>.*?)(?P<sfx>\+[^\+]*(git)?r?(AUTOINC\+))(?P<rev>.*)") | 958 | git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>.*?)(?P<sfx>\+[^\+]*(git)?r?(AUTOINC\+)?)(?P<rev>.*)") |
960 | m = git_regex.match(pv) | 959 | m = git_regex.match(pv) |
961 | 960 | ||
962 | if m: | 961 | if m: |
@@ -1008,7 +1007,7 @@ def get_recipe_upstream_version(rd): | |||
1008 | src_uri = src_uris.split()[0] | 1007 | src_uri = src_uris.split()[0] |
1009 | uri_type, _, _, _, _, _ = decodeurl(src_uri) | 1008 | uri_type, _, _, _, _, _ = decodeurl(src_uri) |
1010 | 1009 | ||
1011 | (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type) | 1010 | (pv, pfx, sfx) = get_recipe_pv_with_pfx_sfx(rd.getVar('PV'), uri_type) |
1012 | ru['current_version'] = pv | 1011 | ru['current_version'] = pv |
1013 | 1012 | ||
1014 | manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION") | 1013 | manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION") |