aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2006-09-27 12:53:38 +0000
committerOlivier Blin <oblin@mandriva.com>2006-09-27 12:53:38 +0000
commitb33f99539fe8b1f34ec531d59b2c775782f0f400 (patch)
tree9ee764c1685aba25612edf4aeaca507eb0cd182a
parent6afb142d0029587544e99ed413d813499630b553 (diff)
downloadmgarepo-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.py16
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)