Use just a single field for handling of --build-requires
Having two fields in the args structure is super ugly. Let's just use one field, and assign True or False to it. No change in function.
This commit is contained in:
parent
1d225f99b1
commit
91907b066f
1 changed files with 5 additions and 3 deletions
|
@ -391,8 +391,10 @@ def main():
|
|||
parser.add_argument("--all-features", action="store_true",
|
||||
help="Activate all available features")
|
||||
parser.add_argument("--dynamic-buildrequires", action="store_true",
|
||||
default=None,
|
||||
help="Use dynamic BuildRequires feature")
|
||||
parser.add_argument("--no-dynamic-buildrequires", action="store_true",
|
||||
parser.add_argument("--no-dynamic-buildrequires", action="store_false",
|
||||
dest="dynamic_buildrequires",
|
||||
help="Do not use dynamic BuildRequires feature")
|
||||
parser.add_argument("--suffix", action="store",
|
||||
help="Package suffix")
|
||||
|
@ -497,8 +499,8 @@ def main():
|
|||
else:
|
||||
kwargs["pkg_release"] = "1%{?dist}"
|
||||
|
||||
if args.target == "fedora" and not args.no_dynamic_buildrequires:
|
||||
args.dynamic_buildrequires = True
|
||||
if args.dynamic_buildrequires is None:
|
||||
args.dynamic_buildrequires = args.target == "fedora"
|
||||
|
||||
kwargs["generate_buildrequires"] = args.dynamic_buildrequires
|
||||
|
||||
|
|
Loading…
Reference in a new issue