summaryrefslogtreecommitdiffstats
path: root/meta
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
parent489465b82be73da1d845a0cea601b41ce5ade411 (diff)
downloadpoky-6148562de22b374ea52ee4f8fcabc9e72a3c1ff5.tar.gz
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')
-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 @@
1
2require conf/distro/include/distro_tracking_fields.inc 1require conf/distro/include/distro_tracking_fields.inc
3 2
4addhandler distro_eventhandler 3addhandler distro_eventhandler
@@ -263,9 +262,10 @@ python do_checkpkg() {
263 """ 262 """
264 prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*[\-_]" # match most patterns which uses "-" as separator to version digits 263 prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*[\-_]" # match most patterns which uses "-" as separator to version digits
265 prefix2 = "[a-zA-Z]+" # a loose pattern such as for unzip552.tar.gz 264 prefix2 = "[a-zA-Z]+" # a loose pattern such as for unzip552.tar.gz
266 prefix = "(%s|%s)" % (prefix1, prefix2) 265 prefix3 = "[0-9a-zA-Z]+" # a loose pattern such as for 80325-quicky-0.4.tar.gz
267 suffix = "(tar\.gz|tgz|tar\.bz2|zip|xz)" 266 prefix = "(%s|%s|%s)" % (prefix1, prefix2, prefix3)
268 suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz") 267 suffix = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm)"
268 suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz", "src.rpm")
269 269
270 sinterstr = "(?P<name>%s?)(?P<ver>.*)" % prefix 270 sinterstr = "(?P<name>%s?)(?P<ver>.*)" % prefix
271 sdirstr = "(?P<name>%s)(?P<ver>.*)\.(?P<type>%s$)" % (prefix, suffix) 271 sdirstr = "(?P<name>%s)(?P<ver>.*)\.(?P<type>%s$)" % (prefix, suffix)
@@ -294,9 +294,8 @@ python do_checkpkg() {
294 (en, ev, et) = new 294 (en, ev, et) = new
295 if on != en or (et and et not in suffixtuple): 295 if on != en or (et and et not in suffixtuple):
296 return 0 296 return 0
297 297 ov = re.search("[\d|\.]+[^a-zA-Z]+", ov).group()
298 ov = re.search("\d+[^a-zA-Z]+", ov).group() 298 ev = re.search("[\d|\.]+[^a-zA-Z]+", ev).group()
299 ev = re.search("\d+[^a-zA-Z]+", ev).group()
300 return bb.utils.vercmp(("0", ov, ""), ("0", ev, "")) 299 return bb.utils.vercmp(("0", ov, ""), ("0", ev, ""))
301 300
302 """ 301 """
@@ -415,6 +414,7 @@ python do_checkpkg() {
415 414
416 """match "{PN}-5.21.1.tar.gz">{PN}-5.21.1.tar.gz """ 415 """match "{PN}-5.21.1.tar.gz">{PN}-5.21.1.tar.gz """
417 pn1 = re.search("^%s" % prefix, curname).group() 416 pn1 = re.search("^%s" % prefix, curname).group()
417
418 s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1 418 s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
419 searchstr = "[hH][rR][eE][fF]=\"%s\".*>" % s 419 searchstr = "[hH][rR][eE][fF]=\"%s\".*>" % s
420 reg = re.compile(searchstr) 420 reg = re.compile(searchstr)