diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index a6e6e80..6867ab5 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -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