From 8e8ae0c96996ddccc79d9a1ec9d6bfb8f440f130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 11 Dec 2021 12:14:01 +0100 Subject: [PATCH] Add --no-rpmautospec option Fixes #170. --- rust2rpm/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"}: