diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-05 20:56:25 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-05 20:56:25 +0000 |
commit | 57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283 (patch) | |
tree | 156c22582728186a9c34d9e274ec5e87b6900bc1 /create-srpm | |
parent | 3f8b8f70d7d81c956e0f4e3dbc66d97e91d4e55b (diff) | |
download | mgarepo-57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283.tar mgarepo-57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283.tar.gz mgarepo-57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283.tar.bz2 mgarepo-57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283.tar.xz mgarepo-57c80e59a9f3b38c4c1dc00fd3e8001b5e2b4283.zip |
Allow listing targets through SSH submit host
It required to add a option --list on create-srpm and change repsys submit
to use this option.
Diffstat (limited to 'create-srpm')
-rwxr-xr-x | create-srpm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/create-srpm b/create-srpm index 3dab068..0c51e97 100755 --- a/create-srpm +++ b/create-srpm @@ -89,8 +89,11 @@ def parse_options(): dest="urlmap", default=False, help="disable url mapping") parser.add_option("--define", action="append") + parser.add_option("--list", dest="list_targets", default=False, + action="store_true", + help="list submit targets available") opts, args = parser.parse_args() - if not args: + if not opts.list_targets and not args: parser.error("you must supply a package url") return opts, args @@ -100,7 +103,12 @@ def main(): iface = CmdIface() opts, args = parse_options() try: - iface.submit_package(args[0], opts.revision, opts.target, opts.urlmap, opts.define) + if opts.list_targets: + for target in iface.submit_targets(): + print target + else: + iface.submit_package(args[0], opts.revision, opts.target, + opts.urlmap, opts.define) except Error, e: sys.stderr.write("error: %s\n" % str(e)) sys.exit(1) |