Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=3b5ea2a49f3f36ee5fa7aa8f1959dd61ca857030
commit 3b5ea2a49f3f36ee5fa7aa8f1959dd61ca857030 Author: Miklos Vajna <vmik...@frugalware.org> Date: Fri Aug 27 16:18:45 2010 +0200 syncpkgcd: add blacklist feature diff --git a/syncpkgd/cconfig.py b/syncpkgd/cconfig.py index ce68cb4..e542de0 100644 --- a/syncpkgd/cconfig.py +++ b/syncpkgd/cconfig.py @@ -9,4 +9,7 @@ class config: # if the load is higher than this value, don't start building a new package #throttle = 1.00 + # never try to build these packages, just fail + #blacklist = ['foo', 'bar'] + # vim: ft=python diff --git a/syncpkgd/syncpkgcd.py b/syncpkgd/syncpkgcd.py index c5a7065..e367932 100644 --- a/syncpkgd/syncpkgcd.py +++ b/syncpkgd/syncpkgcd.py @@ -110,6 +110,12 @@ class Syncpkgcd: return False else: return True + + def checkblacklist(self, pkg): + if not hasattr(config, "blacklist"): + # no blacklist defined + return True + return pkg not in config.blacklist def build(self, pkg): # maybe later support protocolls (the first item) other than git? @@ -119,6 +125,14 @@ class Syncpkgcd: pkgname = "-".join(pkgarr[:-3]) pkgver = "-".join(pkgarr[-3:-1]) arch = pkgarr[-1] + if not self.checkblacklist(pkgname): + self.log(pkg, "blacklisted package, aborting the build") + buf = "The package is on the blacklist of this client." + try: + server.report_result(config.server_user, config.server_pass, pkg, 1, base64.encodestring(buf)) + except socket.error: + pass + return self.log(pkg, "starting build") sock = os.popen("export HOME=%s; . ~/.repoman.conf; echo $fst_root; echo $%s_servers" % (self.home, tree)) buf = sock.readlines() _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git