rust2rpm: tweak existence check warning (tweak for compat packages)

This commit is contained in:
Fabio Valentini 2022-07-08 15:00:07 +02:00
parent aa2bacbad6
commit 0544354e00
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -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