Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703590 - cargo.eclass should enable --path . for all installs by default
Summary: cargo.eclass should enable --path . for all installs by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-12-23 03:56 UTC by Doug Goldstein (RETIRED)
Modified: 2019-12-27 02:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2019-12-23 03:56:29 UTC
This should be set in the eclass as it works for 2015 and 2018 editions now and no longer works with newer versions of Cargo without. All versions in the tree support this syntax with 2015 crates.

Best approach would be to update the eclass and update all the ebuild's in the tree to just work nicely.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-12-25 01:16:11 UTC
I have a lot of changes piling up for cargo.eclass, probably I'll end up doing eclass revbump to get rid of virtual/cargo dep properly.


passing --path=. breaks some crates with meta-crates, look at alacritty.

I have to pass --path=alacritty

if we pass both --path=. and --path=alacritty cargo blows up.

meta crates are not that common, and probably I can do 'cd alacritty' before running cargo, but this needs a bit of additional investigation.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2019-12-26 19:08:29 UTC
Eh. I don't really think we need a revbump of the eclass given the fact we use git now and can do updates in lock step.

The eclass should also be using --offline across the board as I got that added upstream for Gentoo and Yocto specifically. A lot of cargo-ebuild and the eclass were originally in existence to work around the fact that cargo didn't have the --offline flag. Overtime it's allowed us to simplify the eclass and the process for ebuilds.

Super simple to work around the --path=alacritty thing. Added CARGO_INSTALL_PATH which defaults to . in my PR.

If you've got no other review comments I'll look to merge it shortly after the new year.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-12-27 00:18:38 UTC
virtual removal bug and discussion

https://archives.gentoo.org/gentoo-dev/message/be5043fb069242ca8bc27c69faa92587
https://bugs.gentoo.org/695698

it's more about tree policy and portage.
Comment 4 Larry the Git Cow gentoo-dev 2019-12-27 02:03:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43c2a717e665e94232f46379013706959207c51a

commit 43c2a717e665e94232f46379013706959207c51a
Author:     Doug Goldstein <cardoe@gentoo.org>
AuthorDate: 2019-12-23 03:30:33 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-12-27 01:59:29 +0000

    eclass/cargo.eclass: specify --path . to install
    
    cargo install has long required --path . for 2018 edition crates but not
    required it for 2015 edition crates. It is supported however for 2015
    edition crates and works for all versions in the tree so it makes sense
    to make it the default. Added CARGO_INSTALL_PATH as an eclass variable
    allowing to override the default.
    
    Closes: https://bugs.gentoo.org/703590
    Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/14097
    Tested-by: Georgy Yakovlev <gyakovlev@gentoo.org>
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 app-crypt/nitrocli/nitrocli-0.2.4.ebuild          | 2 +-
 app-crypt/nitrocli/nitrocli-0.3.0.ebuild          | 2 +-
 app-misc/cargo-license/cargo-license-0.3.0.ebuild | 2 +-
 app-misc/rpick/rpick-0.4.0.ebuild                 | 2 +-
 app-misc/rpick/rpick-0.5.0.ebuild                 | 2 +-
 app-misc/skim/skim-0.5.4.ebuild                   | 2 +-
 app-misc/skim/skim-0.5.5.ebuild                   | 2 +-
 app-misc/skim/skim-0.6.4.ebuild                   | 2 +-
 app-misc/skim/skim-0.6.6.ebuild                   | 2 +-
 app-misc/skim/skim-0.6.7.ebuild                   | 2 +-
 app-misc/skim/skim-0.6.8.ebuild                   | 2 +-
 app-shells/mcfly/mcfly-0.3.4.ebuild               | 2 +-
 app-text/fblog/fblog-1.3.1.ebuild                 | 2 +-
 dev-util/cargo-tree/cargo-tree-0.23.0.ebuild      | 2 +-
 dev-util/cargo-tree/cargo-tree-0.24.0.ebuild      | 2 +-
 dev-util/cargo-tree/cargo-tree-0.25.0.ebuild      | 2 +-
 dev-util/cargo-tree/cargo-tree-0.26.0.ebuild      | 2 +-
 dev-util/cargo-tree/cargo-tree-0.27.0.ebuild      | 2 +-
 dev-util/sccache/sccache-0.2.10.ebuild            | 2 +-
 dev-util/sccache/sccache-0.2.8-r2.ebuild          | 2 +-
 dev-util/sccache/sccache-0.2.9.ebuild             | 2 +-
 dev-util/wasmer/wasmer-0.11.0.ebuild              | 2 +-
 eclass/cargo.eclass                               | 8 +++++++-
 media-video/rav1e/rav1e-9999.ebuild               | 4 ----
 sys-apps/bat/bat-0.12.0.ebuild                    | 2 +-
 sys-apps/exa/exa-0.9.0.ebuild                     | 2 +-
 sys-apps/fd/fd-7.3.0-r1.ebuild                    | 2 +-
 sys-apps/lsd/lsd-0.14.0.ebuild                    | 2 +-
 sys-apps/lsd/lsd-0.15.1.ebuild                    | 2 +-
 sys-apps/lsd/lsd-0.16.0.ebuild                    | 2 +-
 sys-apps/ripgrep/ripgrep-11.0.1.ebuild            | 2 +-
 sys-apps/ripgrep/ripgrep-11.0.2.ebuild            | 2 +-
 x11-terms/alacritty/alacritty-0.3.3-r1.ebuild     | 4 +++-
 x11-terms/alacritty/alacritty-0.4.0.ebuild        | 4 +++-
 x11-terms/alacritty/alacritty-9999.ebuild         | 4 +++-
 35 files changed, 46 insertions(+), 38 deletions(-)