From fc23a9bd5012d07cc6ef9d1eba12f320763068d9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 7 Jan 2015 12:10:53 +0100 Subject: Add support for package base co-maintainers This allows for having multiple co-maintainers for AUR packages. Co-maintainers have push access to the package base Git repository but are not allowed to change the package base category, disown the package or modify the list of co-maintainers. The primary maintainer of an AUR package can edit the list of co-maintainers from the Package Actions box. Implements FS#17911. Signed-off-by: Lukas Fleischer --- scripts/git-integration/git-update.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts/git-integration/git-update.py') diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py index 1ff09b8..b20c0a2 100755 --- a/scripts/git-integration/git-update.py +++ b/scripts/git-integration/git-update.py @@ -47,9 +47,11 @@ def save_srcinfo(srcinfo, db, cur, user): # Update package base details and delete current packages. cur.execute("UPDATE PackageBases SET ModifiedTS = UNIX_TIMESTAMP(), " + - "MaintainerUID = %s, PackagerUID = %s, " + - "OutOfDateTS = NULL WHERE ID = %s", - [user_id, user_id, pkgbase_id]) + "PackagerUID = %s, OutOfDateTS = NULL WHERE ID = %s", + [user_id, pkgbase_id]) + cur.execute("UPDATE PackageBases SET MaintainerUID = %s " + + "WHERE ID = %s AND MaintainerUID IS NULL", + [user_id, pkgbase_id]) cur.execute("DELETE FROM Packages WHERE PackageBaseID = %s", [pkgbase_id]) -- cgit v1.2.3-54-g00ecf