diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 04ad42f..16b1344 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -357,6 +357,8 @@ def main(): help="Store crate in current directory") parser.add_argument("-a", "--rpmautospec", action="store_true", help="Use autorelease and autochangelog features") + parser.add_argument("--no-rpmautospec", action="store_false", + help="Do not use rpmautospec") parser.add_argument("--all-features", action="store_true", help="Activate all available features") parser.add_argument("--dynamic-buildrequires", action="store_true", @@ -436,7 +438,9 @@ def main(): kwargs["auto_changelog_entry"] = not args.no_auto_changelog_entry - rpmautospec = args.rpmautospec or detect_rpmautospec(default_target, spec_file) + rpmautospec = args.rpmautospec + if args.rpmautospec is None: + rpmautospec = detect_rpmautospec(default_target, spec_file) kwargs["rpmautospec"] = rpmautospec if args.target in {"fedora", "mageia", "opensuse"}: