#107 Use `cargo install --no-track` with cargo 1.41
Merged 4 years ago by ignatenkobrain. Opened 4 years ago by jistone.
fedora-rust/ jistone/rust2rpm no-track  into  master

file modified
+1 -1
@@ -101,11 +101,11 @@ 

      %{shrink:\

        %{__cargo} install                                            \

          %{__cargo_common_opts}                                      \

+         --no-track                                                  \

          --path .                                                    \

          %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}}            \

          %*                                                          \

      } \

-     %{__rm} %{buildroot}%{_prefix}/.crates.toml                     \

    fi \

  %endif \

  )

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.

rebased onto b4581d8

4 years ago

This will need to wait until we're preparing for 1.41 in Fedora and openSUSE.

Rust 1.41 is in Fedora rawhide now. At the moment, binary rust2rpm packages are going to have an issue with %{_prefix}/.crates2.json left as an unpackaged file. So we either need to update rust-packaging to remove that file as well, like we do for %{_prefix}/.crates.toml, or we need to use the new --no-track option.

I intend to build 1.41 for the stable branches today too. It would be good to have a new rust-packaging to bundle with it in the bodhi update.

Pull-Request has been merged by ignatenkobrain

4 years ago
Metadata