From b33f99539fe8b1f34ec531d59b2c775782f0f400 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 27 Sep 2006 12:53:38 +0000 Subject: print error message when create-srpm fails --- RepSys/commands/submit.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py index 1c3bf8b..e73a4e4 100644 --- a/RepSys/commands/submit.py +++ b/RepSys/commands/submit.py @@ -1,9 +1,8 @@ #!/usr/bin/python from RepSys import Error, config from RepSys.command import * -from RepSys.util import execcmd from RepSys.rpmutil import get_spec, get_submit_info -from RepSys.util import get_auth +from RepSys.util import get_auth, execcmd, get_helper import urllib import getopt import sys @@ -101,12 +100,21 @@ def submit(pkgdirurl, revision, target, list=0): except xmlrpclib.Error, e: raise Error, "remote error: "+str(e) else: - status, output = execcmd("ssh %s /usr/share/repsys/create-srpm '%s' %s %s" % (host, pkgdirurl, revision, target)) + # runs a create-srpm in the server through ssh, which will make a + # copy of the rpm in the export directory + if list: + raise Error, "unable to list targets from svn+ssh:// URLs" + createsrpm = get_helper("create-srpm") + command = "ssh %s %s '%s' -r %s -t %s" % ( + host, createsrpm, pkgdirurl, revision, target) + status, output = execcmd(command) if status == 0: print "Package submitted!" else: + sys.stderr.write(output) sys.exit(status) - + + def main(): do_command(parse_options, submit) -- cgit v1.2.1