Skip to contentSkip to conversation

distrodata.bbclass: Fix some issues when checking upstream version on sourceforge

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

lore
Share & tools
lore

Mei Lei

author
#0 lore raw

cover distrodata.bbclass: Fix some issues when checking upstream version on sourceforge

From: Mei Lei <[email protected]>

After this patch, it will check more 34 recipes upsteam version automatically, so we only need to check about 20 recipes upstream version manually. I will continue to reduce the manual check number.

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

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

Mei Lei (1):
distrodata.bbclass: Fix some issues when checking upstream version on
sourceforge

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

PATCH 1/1 distrodata.bbclass: Fix some issues when checking upstream version on sourceforge

From: Mei Lei <[email protected]>

---
 meta/classes/distrodata.bbclass |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
meta/classes/distrodata.bbclass +4 -3
index 049ebf9..d84b306 100644
@@ -368,7 +368,6 @@ python do_checkpkg() {
 			for line in fhtml.split("\n"):
 				if line.find(curver) >= 0:
 					valid = 1
-
 				m = reg.search(line)
 				if m:
 					ver = m.group().split("\"")[1]
@@ -416,7 +415,7 @@ python do_checkpkg() {
 			pn1 = re.search("^%s" % prefix, curname).group()
 			
 			s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
-			searchstr = "[hH][rR][eE][fF]=\"%s\".*>" % s
+			searchstr = "[hH][rR][eE][fF]=\"%s\".*[>\"]" % s
 			reg = re.compile(searchstr)
 	
 			valid = 0
@@ -425,6 +424,8 @@ python do_checkpkg() {
 				if m:
 					valid = 1
 					ver = m.group().split("\"")[1].split("/")[-1]
+					if ver == "download":
+						ver = m.group().split("\"")[1].split("/")[-2]
 					ver = parse_dir(ver)
 					if ver and __vercmp(newver, ver) < 0:
 						newver = ver
@@ -434,7 +435,7 @@ python do_checkpkg() {
 				status = "ErrParseDir"
 			else:
 				"""newver still contains a full package name string"""
-				status = re.search("(\d+[.\-_])*[0-9a-zA-Z]+", newver[1]).group()
+				status = re.search("(\d+[\.\-_])*(\d+[0-9a-zA-Z]*)", newver[1]).group()
 		elif not len(fhtml):
 			status = "ErrHostNoDir"
 
Signature · 1 line
1.6.3.3
#2 lore raw
In reply to Mei Lei
Quoted 14 lines · Mei Lei

From: Mei Lei <[email protected]>

After this patch, it will check more 34 recipes upsteam version automatically, so we only need to check about 20 recipes upstream version manually. I will continue to reduce the manual check number.

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

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

Quoted 6 lines

Mei Lei (1):
distrodata.bbclass: Fix some issues when checking upstream version on
sourceforge

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

Merged to master, thanks.

Cheers,

Richard