aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2006-09-27 12:54:11 +0000
committerOlivier Blin <oblin@mandriva.com>2006-09-27 12:54:11 +0000
commit7a93339094b0ca14b4f09b9f5dd48abc254c9d9b (patch)
tree264f12fc1ddabbdd96326f91325024880c548a7f
parentb33f99539fe8b1f34ec531d59b2c775782f0f400 (diff)
downloadmgarepo-7a93339094b0ca14b4f09b9f5dd48abc254c9d9b.tar
mgarepo-7a93339094b0ca14b4f09b9f5dd48abc254c9d9b.tar.gz
mgarepo-7a93339094b0ca14b4f09b9f5dd48abc254c9d9b.tar.bz2
mgarepo-7a93339094b0ca14b4f09b9f5dd48abc254c9d9b.tar.xz
mgarepo-7a93339094b0ca14b4f09b9f5dd48abc254c9d9b.zip
make submit pass --define options to create-srpm script
-rw-r--r--RepSys/commands/submit.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py
index e73a4e4..5cc8141 100644
--- a/RepSys/commands/submit.py
+++ b/RepSys/commands/submit.py
@@ -35,6 +35,7 @@ def parse_options():
parser.defaults["revision"] = ""
parser.add_option("-t", dest="target", default="Cooker")
parser.add_option("-l", dest="list", action="store_true")
+ parser.add_option("--define", action="append")
opts, args = parser.parse_args()
if not args:
name, rev = get_submit_info(".")
@@ -56,7 +57,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)
@@ -107,6 +108,8 @@ 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!"