diff options
-rw-r--r-- | MgaRepo/commands/maintdb.py | 44 | ||||
-rw-r--r-- | mgarepo.conf | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/MgaRepo/commands/maintdb.py b/MgaRepo/commands/maintdb.py new file mode 100644 index 0000000..4d64dac --- /dev/null +++ b/MgaRepo/commands/maintdb.py @@ -0,0 +1,44 @@ +#!/usr/bin/python +from MgaRepo import Error, config +from MgaRepo.command import * +from MgaRepo.util import execcmd, get_helper +import sys + + +HELP = """\ +Usage: + Take maintainership of one package : + mgarepo maintdb set [package] [login] + + Remove yourself from maintainer of a package : + mgarepo maintdb set [package] nobody + + See who is maintainer of a package : + mgarepo maintdb get [package] + + See the list of all packages with their maintainer : + mgarepo maintdb get + +""" + +def parse_options(): + parser = OptionParser(help=HELP) + opts, args = parser.parse_args() + if len(args): + opts.maintdb_args = args + else: + raise Error, "you need to provide arguments" + return opts + +def maintdb(maintdb_args): + host = config.get("submit", "host") + maintdb_helper = get_helper("maintdb") + cmd_args = ' '.join(maintdb_args) + command = "ssh %s %s %s" % (host, maintdb_helper, cmd_args) + execcmd(command, show=True) + sys.exit(0) + +def main(): + do_command(parse_options, maintdb) + +# vim:et:ts=4:sw=4 diff --git a/mgarepo.conf b/mgarepo.conf index aab27fe..3bedca0 100644 --- a/mgarepo.conf +++ b/mgarepo.conf @@ -14,6 +14,7 @@ oldurl = svn+ssh://svn.mageia.org/svn/packages/misc [helper] create-srpm = /usr/local/bin/submit_package upload-srpm = /usr/local/bin/youri.devel +maintdb = /usr/local/bin/wrapper.maintdb [submit] host = pkgsubmit.mageia.org |