cargo wrapper: improve log messages

This commit is contained in:
Blair Noctis 2025-01-17 14:04:40 +00:00 committed by Fabian Grünbichler
parent 1e1904c93c
commit e294152256

8
debian/bin/cargo vendored
View File

@ -190,12 +190,12 @@ def main(*args):
host_rust_type = os.getenv("DEB_HOST_RUST_TYPE", "")
host_gnu_type = os.getenv("DEB_HOST_GNU_TYPE", "")
log("options, profiles, parallel, lto:", build_options, build_profiles, parallel, lto)
log("rust_type, gnu_type:", ", ".join([host_rust_type, host_gnu_type]))
log(f'options = {build_options}, profiles = {build_profiles}, parallel = {parallel}, lto = {lto}')
log(f'rust_type = {host_rust_type}, gnu_type = {host_gnu_type}')
if "RUSTFLAGS" in os.environ:
# see https://github.com/rust-lang/cargo/issues/6338 for explanation on why we must do this
log("unsetting RUSTFLAGS and assuming it will be (or already was) added to $CARGO_HOME/config.toml")
# https://github.com/rust-lang/cargo/issues/6338
log('unsetting RUSTFLAGS for rust-lang/cargo#6338; add them to .cargo/config.toml')
extra_rustflags = os.environ["RUSTFLAGS"]
del os.environ["RUSTFLAGS"]
else: