aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/commands/buildrpm.py6
-rw-r--r--MgaRepo/rpmutil.py3
2 files changed, 7 insertions, 2 deletions
diff --git a/MgaRepo/commands/buildrpm.py b/MgaRepo/commands/buildrpm.py
index fe4adc9..76fa41e 100644
--- a/MgaRepo/commands/buildrpm.py
+++ b/MgaRepo/commands/buildrpm.py
@@ -13,16 +13,18 @@ Options:
-bX Build stage option, where X is stage, default is -bb
-l Disable rpmlint check of packages built
-P USER Define the RPM packager information to USER
- -q Silent build output
+ -q Quiet build output
+ -s Jump to specific build stage (--short-circuit)
"""
def parse_options():
parser = OptionParser(HELP)
parser.add_option("-b", dest="build_cmd", default="a")
+ parser.add_option("-l", dest="rpmlint", action="store_false", default=True)
parser.add_option("-P", dest="packager", default="")
parser.add_option("-q", "--quiet", dest="verbose", action="store_false", default=True)
- parser.add_option("-l", dest="rpmlint", action="store_false", default=True)
+ parser.add_option("-s", "--short-circuit", dest="short_circuit", action="store_true", default=False)
opts, args = parser.parse_args()
return opts
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 550e2aa..3220cf0 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -377,6 +377,7 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None,
def build_rpm(build_cmd="b",
verbose=False,
rpmlint=True,
+ short_circuit=False,
packager = "",
macros = []):
top = os.getcwd()
@@ -408,6 +409,8 @@ def build_rpm(build_cmd="b",
rpmbuild = config.get("helper", "rpmbuild", "rpmbuild")
args = [rpmbuild, "-b"+build_cmd, spec]
+ if short_circuit:
+ args.append("--short-circuit")
for pair in rpmdefs:
args.extend(pair)
for pair in macros: