eclass: clean up .crates2.json when running cargo install

When instaling rust packages with Rust 1.42, it fails like the
following message:

```
 * Detected file collision(s):
 *
 *      /build/amd64-usr/usr/.crates2.json
```

Fix the install function in cargo.eclass so it can clean up the garbage
json file.
This commit is contained in:
Dongsu Park 2020-03-18 16:15:44 +01:00
parent e8b5b8a3ce
commit 276137505e

View File

@ -134,7 +134,8 @@ cargo_src_install() {
cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") "$@" \ cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") "$@" \
|| die "cargo install failed" || die "cargo install failed"
rm -f "${D}/usr/.crates.toml" rm -f "${ED}/usr/.crates.toml"
rm -f "${ED}/usr/.crates2.json"
[ -d "${S}/man" ] && doman "${S}/man" || return 0 [ -d "${S}/man" ] && doman "${S}/man" || return 0
} }