aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/commands/submit.py
diff options
context:
space:
mode:
Diffstat (limited to 'RepSys/commands/submit.py')
-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)