Skip to contentSkip to conversation

distrodata.bbclass: Fix some checkpkg bugs

PATCH Applied Mei Lei 2 participants 3 messages Feb 21, 2011

lore
Share & tools
lore

Mei Lei

author
#0 lore raw

cover distrodata.bbclass: Fix some checkpkg bugs

From: Mei Lei <[email protected]>

Hi Saul,
This commit fix some bugs in checkpkg function when checking upstream version.

Thanks
Lei

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: lmei3/distrodata.bbclass
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=lmei3/distrodata.bbclass

Thanks,
Mei Lei <[email protected]>
---

Mei Lei (1):
distrodata.bbclass: Fix some bugs for rpm,icu and quicky recipe when
checking upstream version

 meta/classes/distrodata.bbclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
author
#1 lore raw

PATCH 1/1 distrodata.bbclass: Fix some bugs for rpm, icu and quicky recipe when checking upstream version

From: Mei Lei <[email protected]>

Fix some bugs in checkpkg function when checking upstream version

---
 meta/classes/distrodata.bbclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
meta/classes/distrodata.bbclass +7 -7
index 31e7420..049ebf9 100644
@@ -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)
Signature · 1 line
1.6.3.3
#2 lore raw
In reply to Mei Lei
Quoted 17 lines · Mei Lei

From: Mei Lei <[email protected]>

Hi Saul,
This commit fix some bugs in checkpkg function when checking upstream version.

Thanks
Lei

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: lmei3/distrodata.bbclass
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=lmei3/distrodata.bbclass

Thanks,
Mei Lei <[email protected]>
---

Quoted 6 lines

Mei Lei (1):
distrodata.bbclass: Fix some bugs for rpm,icu and quicky recipe when
checking upstream version

 meta/classes/distrodata.bbclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Merged to master, thanks.

Richard