patching: log warning when rust2rpm-helper is not in PATH

This commit is contained in:
Fabio Valentini 2023-10-10 00:42:36 +02:00
parent 445feba9ee
commit 607ffb50e6
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -70,6 +70,10 @@ def preprocess_cargo_toml(contents: str, features: set[str]) -> Optional[str]:
if shutil.which("rust2rpm-helper"):
return preprocess_cargo_toml_helper(contents)
else:
log.warn(
"Falling back to broken built-in implementation for stripping non-applicable "
+ "target-specific depdendencies: rust2rpm-helper is not installed"
)
return preprocess_cargo_toml_fallback(contents, features)