On 6/1/19 4:27 AM, Alexander Kanavin wrote:
On Sun, 12 May 2019 at 10:18, Hongxu Jia <[email protected] <mailto:[email protected]>> wrote:

    The upstream git tag has a `upstream/' prefix, such as:
    >>> import re
    >>> pattern = "upstream/(?P<pver>\d+(\.\d+)+(\+\d+)*)"
    >>> string = "upstream/6.1+20181013"
    >>> result = re.match(pattern, string)
    >>> result['pver']
    '6.1+20181013'


Have you checked with devtool that this actually works?

I am afraid no, I did not run devtool it before


Before this commit:
alexander@alexander-box:~/development/poky$ devtool check-upgrade-status ncurses INFO: ncurses                   6.1             6.1+20181013    Hongxu Jia <[email protected] <mailto:[email protected]>> 7a97a7f937762ba342d5b2fd7cd090885a809835

Then I know the script, and run it, I am afraid only revert is not sufficient.

The current ncurses version is `6.1+20181013' rather than `6.1', since upstream latest

version is `6.1+20181013', but auth email incorrect report ncurses should be upgraded

(that's why I try to fix UPSTREAM_CHECK_GITTAGREGEX, but it seems a wrong try)


Thanks to your mention of devtool, I know how auth works, and trace the root cause,

then I found in the following commit, it filters out `+' from git pv, but in ncurse case,

`+' is part of version

...

commit ab609c471d85be3248b789c8ab2813957cd97e29
Author: Alexander Kanavin <[email protected]>
Date:   Mon Aug 3 19:29:54 2015 +0300

    recipeutils.py: allow all characters in regexes used to parse version strings

    Previously only numeric characters were matches and anything else was
    discarded, so 4.0-rc3, 2005e, 1.0.2a and similar versions got truncated.

    Signed-off-by: Alexander Kanavin <[email protected]>
    Signed-off-by: Richard Purdie <[email protected]>

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 9d45b42..cd74213 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -638,7 +638,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
     sfx = ''

     if uri_type == 'git':
-        git_regex = re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)") +        git_regex = re.compile("(?P<pfx>v?)(?P<ver>[^\+]*)((?P<sfx>\+(git)?r?(AUTOINC\+))(?P<rev>.*))?")
         m = git_regex.match(pv)

         if m:

...

I believe the commit is to parse manually  PV in **_git.bb (such as `PV = "1.9.0+git${SRCPV}"' ),

which contains `+gitAUTOINC+' in PV, but the regrex is not suitable for ncurses version


//Hongxu


After the commit:
alexander@alexander-box:~/development/poky$ devtool check-upgrade-status ncurses INFO: ncurses                   6.1 UNKNOWN_BROKEN  Hongxu Jia <[email protected] <mailto:[email protected]>>

The code in bitbake/lib/bb/fetch2/git.py actually splits each tag with '/' as separator and takes only the last part for some reason, so those prefixes are never a part of the string that is matched against regex.
I'll send a revert in a moment.

Alex



-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to