distrodata.bbclass: Fix some issues when checking upstream version on sourceforge
Signed-off-by: Mei Lei <lei.mei@intel.com>
This commit is contained in:
parent
6abfee773f
commit
adbaae2179
|
@ -368,7 +368,6 @@ python do_checkpkg() {
|
||||||
for line in fhtml.split("\n"):
|
for line in fhtml.split("\n"):
|
||||||
if line.find(curver) >= 0:
|
if line.find(curver) >= 0:
|
||||||
valid = 1
|
valid = 1
|
||||||
|
|
||||||
m = reg.search(line)
|
m = reg.search(line)
|
||||||
if m:
|
if m:
|
||||||
ver = m.group().split("\"")[1]
|
ver = m.group().split("\"")[1]
|
||||||
|
@ -416,7 +415,7 @@ python do_checkpkg() {
|
||||||
pn1 = re.search("^%s" % prefix, curname).group()
|
pn1 = re.search("^%s" % prefix, curname).group()
|
||||||
|
|
||||||
s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
|
s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
|
||||||
searchstr = "[hH][rR][eE][fF]=\"%s\".*>" % s
|
searchstr = "[hH][rR][eE][fF]=\"%s\".*[>\"]" % s
|
||||||
reg = re.compile(searchstr)
|
reg = re.compile(searchstr)
|
||||||
|
|
||||||
valid = 0
|
valid = 0
|
||||||
|
@ -425,6 +424,8 @@ python do_checkpkg() {
|
||||||
if m:
|
if m:
|
||||||
valid = 1
|
valid = 1
|
||||||
ver = m.group().split("\"")[1].split("/")[-1]
|
ver = m.group().split("\"")[1].split("/")[-1]
|
||||||
|
if ver == "download":
|
||||||
|
ver = m.group().split("\"")[1].split("/")[-2]
|
||||||
ver = parse_dir(ver)
|
ver = parse_dir(ver)
|
||||||
if ver and __vercmp(newver, ver) < 0:
|
if ver and __vercmp(newver, ver) < 0:
|
||||||
newver = ver
|
newver = ver
|
||||||
|
@ -434,7 +435,7 @@ python do_checkpkg() {
|
||||||
status = "ErrParseDir"
|
status = "ErrParseDir"
|
||||||
else:
|
else:
|
||||||
"""newver still contains a full package name string"""
|
"""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):
|
elif not len(fhtml):
|
||||||
status = "ErrHostNoDir"
|
status = "ErrHostNoDir"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue