generator: fix condition for setting cargo_install_bin for compat packages

This commit is contained in:
Fabio Valentini 2024-02-24 19:00:07 +01:00
parent 2961950b31
commit b9550775b3
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -212,7 +212,7 @@ def spec_render_crate(
is_cdylib = metadata.is_cdylib() is_cdylib = metadata.is_cdylib()
cargo_install_lib = (tomlconf.package_cargo_install_lib is not False) and (vendor_tarball is None) cargo_install_lib = (tomlconf.package_cargo_install_lib is not False) and (vendor_tarball is None)
cargo_install_bin = (tomlconf.package_cargo_install_bin is not False) and (not compat) cargo_install_bin = (tomlconf.package_cargo_install_bin is not False) and (not compat if is_bin else True)
if tomlconf.package_bin_package_name is None: if tomlconf.package_bin_package_name is None:
bin_name = "%{crate}" bin_name = "%{crate}"