# HG changeset patch # User Wolfgang Rosenauer # Date 1381065320 -7200 # Node ID 418f808c28e0db091a4a9587caaaac073d749ad3 # Parent fffe07f13f9a54677810c62667b2d8392bab3e1f use current distribution versions handle non-existing repos gracefully try to ignore xulrunner packages (not working yet) diff -r fffe07f13f9a -r 418f808c28e0 upload_buildsymbols.py --- a/upload_buildsymbols.py Wed Sep 14 17:08:10 2011 +0200 +++ b/upload_buildsymbols.py Sun Oct 06 15:15:20 2013 +0200 @@ -30,6 +30,9 @@ tmpstr = fn[0].rsplit(".", 1)[0] tmpstr = tmpstr.rsplit("-", 2) name = tmpstr[0].rsplit("-", 1)[0] + # filter xulrunner symbols + if name.find("xulrunner") == -1: + continue version = tmpstr[1] + "-" + tmpstr[2] if version.find("_") == -1: self.packages[name] = version @@ -49,9 +52,9 @@ lf = open(filename, "wb") lf.write(f.read()) lf.close() - except HTTPError, e: + except urllib2.HTTPError, e: print "HTTP Error:",e.code , uri - except URLError, e: + except urllib2.URLError, e: print "URL Error:",e.reason , uri # extract @@ -84,7 +87,13 @@ def find_packages(repo, arch): updates = [] - f = urllib2.urlopen(repo) + try: + f = urllib2.urlopen(repo) + except urllib2.HTTPError, e: + print e.code + print "Repo does not exist" + return False + s = f.read() parser = MyParser() @@ -128,9 +137,9 @@ baseurl = "http://download.opensuse.org/" archs = [ "i586", "x86_64"] -repos = [ "distribution/11.3/repo/oss/suse/", "update/11.3/rpm/", "distribution/11.4/repo/oss/suse/", "update/11.4/rpm/" ] -bsrepos = [ "repositories/mozilla/", "repositories/mozilla:/beta/" ] -bsdists = [ "openSUSE_11.4", "openSUSE_11.3", "openSUSE_11.2" ] +repos = [ "distribution/12.2/repo/oss/suse/", "distribution/12.3/repo/oss/suse/", "update/12.2/", "update/12.3/" ] +bsrepos = [ "repositories/mozilla/", "repositories/mozilla:/beta/", "repositories/mozilla:/alpha/" ] +bsdists = [ "openSUSE_13.1", "openSUSE_12.3", "openSUSE_12.2" ] SSHCONF = "mozsymbols" # product repos