cardoe / cargo-ebuild

cargo extension that can generate ebuilds using the in-tree eclasses
Apache License 2.0
75 stars 13 forks source link

Local crates using 2018 edition fails due to `cargo install` change. #24

Closed divoxx closed 5 years ago

divoxx commented 5 years ago

When attempting to use cargo-ebuild to build a crate from source, it fails with the following error if using 2018 edition:

Using `cargo install` to install the binaries for the package in current working directory
is no longer supported, use `cargo install --path .` instead. Use `cargo build` if you
want to simply build the package.

This seems to be due to this change: https://github.com/rust-lang/cargo/issues/5327

This error only happening when installing from a source archive (local crate), not from a downloaded crate.

divoxx commented 5 years ago

I am able to get it working by updating the cargo_src_install function to pass --path="${S}". I'll push up a pull request for this.

divoxx commented 5 years ago

Actually, the change needs to happen to cargo.eclass, not this repository. Not sure where is the best channel to report that.

gyakovlev commented 5 years ago

@divoxx cargo.eclass in gentoo supports passing args to cargo_src_install since January 2019.

just pass cargo_src_install --path=. in src_install it was not possible to enable it globally at the time in the eclass, so we do it on per-package basis for now.

divoxx commented 5 years ago

@gyakovlev nice, that's good to know. Thanks.

cardoe commented 4 years ago

https://github.com/gentoo/gentoo/pull/14097 suggests changing the defaults here to something sensible given the versions of cargo/rust in the tree.