aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/commands
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2006-09-27 13:45:38 +0000
committerOlivier Blin <oblin@mandriva.com>2006-09-27 13:45:38 +0000
commit3c632697bd604933d3284acdc79eb3178ddd77ef (patch)
treebb4d29e4d63ce2e876fdf2244ca238edd3b05533 /RepSys/commands
parentc9cddb1f54760c5c3aabfd1b637ca07fa89bc91a (diff)
downloadmgarepo-3c632697bd604933d3284acdc79eb3178ddd77ef.tar
mgarepo-3c632697bd604933d3284acdc79eb3178ddd77ef.tar.gz
mgarepo-3c632697bd604933d3284acdc79eb3178ddd77ef.tar.bz2
mgarepo-3c632697bd604933d3284acdc79eb3178ddd77ef.tar.xz
mgarepo-3c632697bd604933d3284acdc79eb3178ddd77ef.zip
merge 1.6.2b changes
Diffstat (limited to 'RepSys/commands')
-rw-r--r--RepSys/commands/submit.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py
index 6e9eb0f..380391a 100644
--- a/RepSys/commands/submit.py
+++ b/RepSys/commands/submit.py
@@ -39,6 +39,7 @@ def parse_options():
parser.add_option("-t", dest="target", default="Cooker")
parser.add_option("-l", dest="list", action="store_true")
parser.add_option("-r", dest="revision", type="string", nargs=1)
+ parser.add_option("--define", action="append")
opts, args = parser.parse_args()
if not args:
name, rev = get_submit_info(".")
@@ -63,7 +64,7 @@ def parse_options():
raise Error, "provide -l or a revision number"
return opts
-def submit(pkgdirurl, revision, target, list=0):
+def submit(pkgdirurl, revision, target, list=0, define=[]):
#if not NINZ:
# raise Error, "you must have NINZ installed to use this command"
type, rest = urllib.splittype(pkgdirurl)
@@ -113,10 +114,13 @@ def submit(pkgdirurl, revision, target, list=0):
createsrpm = get_helper("create-srpm")
command = "ssh %s %s '%s' -r %s -t %s" % (
host, createsrpm, pkgdirurl, revision, target)
+ if define:
+ command += " " + " ".join([ "--define " + x for x in define ])
status, output = execcmd(command)
if status == 0:
print "Package submitted!"
else:
+ sys.stderr.write(output)
sys.exit(status)