Fix handling of rpmautospec detection

Fixup for 7e0afd5da2: the condition was
updated in one place, but not in the other we used the original
args.rpmautospec value.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-29 14:33:23 +01:00
parent d93c49914c
commit e27e68bda6

View file

@ -426,10 +426,8 @@ def main():
kwargs["auto_changelog_entry"] = not args.no_auto_changelog_entry kwargs["auto_changelog_entry"] = not args.no_auto_changelog_entry
if args.rpmautospec: rpmautospec = args.rpmautospec or detect_rpmautospec(default_target, spec_file)
kwargs["rpmautospec"] = True kwargs["rpmautospec"] = rpmautospec
else:
kwargs["rpmautospec"] = detect_rpmautospec(default_target, spec_file)
if args.target in {"fedora", "mageia", "opensuse"}: if args.target in {"fedora", "mageia", "opensuse"}:
kwargs["include_build_requires"] = True kwargs["include_build_requires"] = True
@ -449,7 +447,7 @@ def main():
kwargs["spec_copyright_year"] = time.strftime("%Y") kwargs["spec_copyright_year"] = time.strftime("%Y")
kwargs["pkg_release"] = "0" kwargs["pkg_release"] = "0"
kwargs["rust_group"] = "Development/Libraries/Rust" kwargs["rust_group"] = "Development/Libraries/Rust"
elif args.rpmautospec: elif rpmautospec:
kwargs["pkg_release"] = "%autorelease" kwargs["pkg_release"] = "%autorelease"
else: else:
kwargs["pkg_release"] = "1%{?dist}" kwargs["pkg_release"] = "1%{?dist}"