From 0544354e00eb4bf21ef723ef4eb2252da252ff34 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 8 Jul 2022 15:00:07 +0200 Subject: [PATCH] rust2rpm: tweak existence check warning (tweak for compat packages) --- rust2rpm/__main__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 3ad7b45..071ce31 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -514,9 +514,17 @@ def main(): if args.target in {"fedora"} and args.existence_check and not os.path.exists(spec_file): # No specfile, so this is probably a new package package_info = get_package_info(pkg_name) + if package_info: - print(f"Crate {pkg_name} is already packaged in Fedora ({package_info['full_url']}).") - print("Re-run with --no-existence-check if you still want to convert it.") + if args.suffix: + print(f"Versions {args.suffix}.* of the crate '{metadata.name}' are already") + print(f"packaged for Fedora: {package_info['full_url']}") + + else: + print(f"Crate '{metadata.name}' is already packaged for Fedora:") + print(f"{package_info['full_url']}") + + print("Re-run with --no-existence-check if you still want to start from scratch.") sys.exit(1) kwargs["auto_changelog_entry"] = args.auto_changelog_entry