summaryrefslogtreecommitdiff
path: root/meta/classes/distrodata.bbclass
diff options
context:
space:
mode:
authorMei Lei <lei.mei@intel.com>2011-02-21 14:34:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-21 17:53:51 +0000
commit6148562de22b374ea52ee4f8fcabc9e72a3c1ff5 (patch)
tree37b93be6c2c6aea89a55b09d5dcf0285ba0d4525 /meta/classes/distrodata.bbclass
parent489465b82be73da1d845a0cea601b41ce5ade411 (diff)
downloadopenembedded-core-6148562de22b374ea52ee4f8fcabc9e72a3c1ff5.tar.gz
openembedded-core-6148562de22b374ea52ee4f8fcabc9e72a3c1ff5.tar.bz2
openembedded-core-6148562de22b374ea52ee4f8fcabc9e72a3c1ff5.zip
distrodata.bbclass: Fix some bugs for rpm,icu and quicky recipe when checking upstream version
Fix some bugs in checkpkg function when checking upstream version Signed-off-by: Mei Lei <lei.mei@intel.com>
Diffstat (limited to 'meta/classes/distrodata.bbclass')
-rw-r--r--meta/classes/distrodata.bbclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index 31e7420cf4..049ebf93a0 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -1,4 +1,3 @@
-
require conf/distro/include/distro_tracking_fields.inc
addhandler distro_eventhandler
@@ -263,9 +262,10 @@ python do_checkpkg() {
"""
prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*[\-_]" # match most patterns which uses "-" as separator to version digits
prefix2 = "[a-zA-Z]+" # a loose pattern such as for unzip552.tar.gz
- prefix = "(%s|%s)" % (prefix1, prefix2)
- suffix = "(tar\.gz|tgz|tar\.bz2|zip|xz)"
- suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz")
+ prefix3 = "[0-9a-zA-Z]+" # a loose pattern such as for 80325-quicky-0.4.tar.gz
+ prefix = "(%s|%s|%s)" % (prefix1, prefix2, prefix3)
+ suffix = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm)"
+ suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz", "src.rpm")
sinterstr = "(?P<name>%s?)(?P<ver>.*)" % prefix
sdirstr = "(?P<name>%s)(?P<ver>.*)\.(?P<type>%s$)" % (prefix, suffix)
@@ -294,9 +294,8 @@ python do_checkpkg() {
(en, ev, et) = new
if on != en or (et and et not in suffixtuple):
return 0
-
- ov = re.search("\d+[^a-zA-Z]+", ov).group()
- ev = re.search("\d+[^a-zA-Z]+", ev).group()
+ ov = re.search("[\d|\.]+[^a-zA-Z]+", ov).group()
+ ev = re.search("[\d|\.]+[^a-zA-Z]+", ev).group()
return bb.utils.vercmp(("0", ov, ""), ("0", ev, ""))
"""
@@ -415,6 +414,7 @@ python do_checkpkg() {
"""match "{PN}-5.21.1.tar.gz">{PN}-5.21.1.tar.gz """
pn1 = re.search("^%s" % prefix, curname).group()
+
s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
searchstr = "[hH][rR][eE][fF]=\"%s\".*>" % s
reg = re.compile(searchstr)