py2rpm: add --binary-only option

Change-Id: I78b43e499747b085b3b2e5398b7647f958afdb3c
This commit is contained in:
Alessio Ababilov 2013-06-25 10:26:01 +03:00
parent 0b10346479
commit 6b3c4292cd

View File

@ -180,6 +180,11 @@ def create_parser():
action="store_true",
default=False,
help="Only generate source RPM")
parser.add_argument(
"--binary-only", "-b",
action="store_true",
default=False,
help="Only generate binary RPM")
parser.add_argument(
"--rpm-base",
metavar="<dir>",
@ -473,6 +478,8 @@ def build_rpm(options, filename):
if options.source_only:
rpmbuild_what = "-bs"
elif options.binary_only:
rpmbuild_what = "-bb"
else:
rpmbuild_what = "-ba"
call_subprocess(