lib/oe/recipeutils.py: accommodate SRCPV being optional and deprecated in version check regex
PATCH 1/2 lib/oe/recipeutils.py: accommodate SRCPV being optional and deprecated in version check regex
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/lib/oe/recipeutils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
meta/lib/oe/recipeutils.py +4 -5
@@ -945,10 +945,9 @@ def replace_dir_vars(path, d): path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) return path -def get_recipe_pv_without_srcpv(pv, uri_type): +def get_recipe_pv_with_pfx_sfx(pv, uri_type): """ - Get PV without SRCPV common in SCM's for now only - support git. + Get PV separating prefix and suffix components. Returns tuple with pv, prefix and suffix. """
@@ -956,7 +955,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): sfx = '' if uri_type == 'git': - git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>.*?)(?P<sfx>\+[^\+]*(git)?r?(AUTOINC\+))(?P<rev>.*)") + git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>.*?)(?P<sfx>\+[^\+]*(git)?r?(AUTOINC\+)?)(?P<rev>.*)") m = git_regex.match(pv) if m:
@@ -1008,7 +1007,7 @@ def get_recipe_upstream_version(rd): src_uri = src_uris.split()[0] uri_type, _, _, _, _, _ = decodeurl(src_uri) - (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd.getVar('PV'), uri_type) + (pv, pfx, sfx) = get_recipe_pv_with_pfx_sfx(rd.getVar('PV'), uri_type) ru['current_version'] = pv manual_upstream_version = rd.getVar("RECIPE_UPSTREAM_VERSION")
Signature · 1 line
2.30.2
PATCH 2/2 python3-sphinx: correct version check
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/recipes-devtools/python/python3-sphinx_7.1.1.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3-sphinx_7.1.1.bb +1 -0
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb6ac1b115a1ed24a12d9f15b633993" SRC_URI[sha256sum] = "59b8e391f0768a96cd233e8300fe7f0a8dc2f64f83dc2a54336a9a84f428ff4e" inherit python_flit_core pypi +UPSTREAM_CHECK_REGEX = "/Sphinx/(?P<pver>(\d+[\.\-_]*)+)/" do_install:append () { # The cache format of "{None, 'en', 'ja'}" doesn't seem to be consistent (dict ordering?)
Signature · 1 line
2.30.2