diff options
author | Olivier Blin <oblin@mandriva.com> | 2006-09-27 12:53:38 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2006-09-27 12:53:38 +0000 |
commit | b33f99539fe8b1f34ec531d59b2c775782f0f400 (patch) | |
tree | 9ee764c1685aba25612edf4aeaca507eb0cd182a | |
parent | 6afb142d0029587544e99ed413d813499630b553 (diff) | |
download | mgarepo-b33f99539fe8b1f34ec531d59b2c775782f0f400.tar mgarepo-b33f99539fe8b1f34ec531d59b2c775782f0f400.tar.gz mgarepo-b33f99539fe8b1f34ec531d59b2c775782f0f400.tar.bz2 mgarepo-b33f99539fe8b1f34ec531d59b2c775782f0f400.tar.xz mgarepo-b33f99539fe8b1f34ec531d59b2c775782f0f400.zip |
print error message when create-srpm fails
-rw-r--r-- | RepSys/commands/submit.py | 16 |
1 files 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) |