[packages/rpm-build-tools/merge-pld-builder-client: 99/2675] - add queue id verifier for skip
glen
glen at pld-linux.org
Mon Dec 19 21:57:14 CET 2016
commit 4740a24f1017e489fd91255a96a59932f9a509a3
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sat Feb 13 19:31:55 2010 +0000
- add queue id verifier for skip
Changed files:
client/make-request.sh -> 1.70
make-request.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
---
diff --git a/make-request.sh b/make-request.sh
index d309c79..1ba01cb 100644
--- a/make-request.sh
+++ b/make-request.sh
@@ -291,6 +291,7 @@ ac)
default_builders="ac-*"
default_branch="AC-branch"
url="http://ep09.pld-linux.org:1289/"
+ control_url="http://ep09.pld-linux.org/~buildsrc"
;;
ac-java) # fake "distro" for java available ac architectures
builder_email="builder-ac at pld-linux.org"
@@ -328,6 +329,55 @@ esac
# need to do this after distro selection
if [ "$skip" ]; then
+ skip=$(skip="$skip" control_url="$control_url" python -c '
+import urllib2
+import sys
+import StringIO
+import gzip
+import re
+import os
+import string
+from xml.dom import minidom
+
+skip = os.environ.get("skip").split(",");
+control_url = os.environ.get("control_url")
+
+print >> sys.stderr, "* Check queue_id-s against %s" % control_url
+
+try:
+ headers = { "Cache-Control": "no-cache", "Pragma": "no-cache" }
+ req = urllib2.Request(url=control_url + "/queue.gz", headers=headers)
+ f = urllib2.urlopen(req)
+except Exception, e:
+ print >> sys.stderr, "Fetch error %s: %s" % (control_url + "/queue.gz", e)
+ sys.exit(1)
+
+sio = StringIO.StringIO()
+sio.write(f.read())
+f.close()
+sio.seek(0)
+f = gzip.GzipFile(fileobj = sio)
+
+xml = re.compile("(<queue>.*?</queue>)", re.DOTALL).match(f.read()).group(1)
+d = minidom.parseString(xml)
+
+q = []
+for c in d.documentElement.childNodes:
+ if c.nodeName != "group":
+ continue
+ q.append(c.attributes["id"].value)
+
+err = 0
+for s in skip:
+ if s not in q:
+ print >> sys.stderr, "- Check %s: ERROR: Not valid queue-id" % s
+ err = 1
+ else:
+ print >> sys.stderr, "- Check %s: OK" % s
+if err == 1:
+ sys.exit(1)
+print string.join(skip, ",")
+') || exit $?
f_upgrade=no
build_mode=test
priority=-1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd
More information about the pld-cvs-commit
mailing list