Use cargo install --no-track with cargo 1.41

In cargo 1.41, `cargo install` adds a new `.crates2.json` file in the
install root for tracking version upgrades. This would be another file
that `%cargo_install` should remove afterward, but there is also a new
`--no-track` option which disables such metadata files altogether.

This update should be coordinated with the Rust toolchain update in the
distro, e.g. with rust-packaging `Requires: cargo >= 1.41`. The new
option will be rejected as an unstable option on earlier versions.
This commit is contained in:
Josh Stone 2020-01-30 22:02:59 -08:00
parent e671086e38
commit b4581d8f5b

View file

@ -101,11 +101,11 @@ fi \
%{shrink:\
%{__cargo} install \
%{__cargo_common_opts} \
--no-track \
--path . \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
%* \
} \
%{__rm} %{buildroot}%{_prefix}/.crates.toml \
fi \
%endif \
)