[aur-dev] [PATCH 4/4] git-update: Allow privileged users to bypass blacklist

Johannes Löthberg johannes at kyriasis.com
Mon Jun 22 22:00:21 UTC 2015


Fixes FS#45410.

Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
 git-interface/git-update.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index 41a3474..c7b3389 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -185,6 +185,7 @@ sha1_new = sys.argv[3]
 
 user = os.environ.get("AUR_USER")
 pkgbase = os.environ.get("AUR_PKGBASE")
+privileged = os.environ.get("AUR_PRIVILEGED", False)
 
 if refname != "refs/heads/master":
     die("pushing to a branch other than master is restricted")
@@ -295,7 +296,7 @@ for pkgname in srcinfo.GetPackageNames():
     pkginfo = srcinfo.GetMergedPackage(pkgname)
     pkgname = pkginfo['pkgname']
 
-    if pkgname in blacklist:
+    if pkgname in blacklist and not privileged:
         die('package is blacklisted: %s' % (pkginfo['pkgname']))
 
     cur.execute("SELECT COUNT(*) FROM Packages WHERE Name = %s AND " +
-- 
2.4.4


More information about the aur-dev mailing list