diff options
| -rw-r--r-- | meta/classes/distrodata.bbclass | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass index 085575a041..e4810273b2 100644 --- a/meta/classes/distrodata.bbclass +++ b/meta/classes/distrodata.bbclass | |||
| @@ -751,34 +751,25 @@ python do_checkpkg() { | |||
| 751 | if not tmp3: | 751 | if not tmp3: |
| 752 | bb.plain("#DEBUG# Package %s: current version (%s) doesn't match the usual pattern" %(pname, pversion)) | 752 | bb.plain("#DEBUG# Package %s: current version (%s) doesn't match the usual pattern" %(pname, pversion)) |
| 753 | elif type == 'svn': | 753 | elif type == 'svn': |
| 754 | options = [] | 754 | ud = bb.fetch2.FetchData(uri, d) |
| 755 | if user: | ||
| 756 | options.append("--username %s" % user) | ||
| 757 | if pswd: | ||
| 758 | options.append("--password %s" % pswd) | ||
| 759 | svnproto = 'svn' | ||
| 760 | if 'proto' in parm: | ||
| 761 | svnproto = parm['proto'] | ||
| 762 | if 'rev' in parm: | ||
| 763 | pcurver = parm['rev'] | ||
| 764 | |||
| 765 | svncmd = "svn info %s %s://%s%s/%s/ 2>&1" % (" ".join(options), svnproto, host, path, parm["module"]) | ||
| 766 | print svncmd | ||
| 767 | svninfo = os.popen(svncmd).read() | ||
| 768 | if "Can't connect to host " in svninfo or "Connection timed out" in svninfo: | ||
| 769 | svncmd = "svn info %s %s://%s%s/%s/ 2>&1" % (" ".join(options), "http", | ||
| 770 | host, path, parm["module"]) | ||
| 771 | svninfo = os.popen(svncmd).read() | ||
| 772 | for line in svninfo.split("\n"): | ||
| 773 | if re.search("^Last Changed Rev:", line): | ||
| 774 | pupver = line.split(" ")[-1] | ||
| 775 | if pupver in pversion: | ||
| 776 | pstatus = "MATCH" | ||
| 777 | else: | ||
| 778 | pstatus = "UPDATE" | ||
| 779 | 755 | ||
| 780 | if re.match("Err", pstatus): | 756 | svnFetcher = bb.fetch2.svn.Svn(d) |
| 757 | svnFetcher.urldata_init(ud, d) | ||
| 758 | try: | ||
| 759 | pupver = svnFetcher.latest_revision(uri, ud, d, ud.names[0]) | ||
| 760 | except bb.fetch2.FetchError: | ||
| 761 | pstatus = "ErrSvnAccess" | ||
| 762 | |||
| 763 | if pupver: | ||
| 764 | if pupver in pversion: | ||
| 765 | pstatus = "MATCH" | ||
| 766 | else: | ||
| 767 | pstatus = "UPDATE" | ||
| 768 | else: | ||
| 781 | pstatus = "ErrSvnAccess" | 769 | pstatus = "ErrSvnAccess" |
| 770 | |||
| 771 | if 'rev' in ud.parm: | ||
| 772 | pcurver = ud.parm['rev'] | ||
| 782 | 773 | ||
| 783 | if pstatus != "ErrSvnAccess": | 774 | if pstatus != "ErrSvnAccess": |
| 784 | tag = pversion.rsplit("+svn")[0] | 775 | tag = pversion.rsplit("+svn")[0] |
