gentoo / cargo-ebuild

[MIRROR] cargo extension that can generate ebuilds using the in-tree eclasses
https://gitweb.gentoo.org/proj/cargo-ebuild.git
Apache License 2.0
33 stars 10 forks source link

Setting CARGO_HOME breaks build #19

Closed mazunki closed 2 years ago

mazunki commented 2 years ago

For some versions, gnome-base/librsvg has been failing to build on my system with doas emerge librsvg, because I've set CARGO_HOME=${XDG_DATA_HOME}/cargo in my environment.

access denied: open_wr ~/.local/share/cargo/. package_cache

From my understanding, the ebuild should clean the environment before trying to build it.

Running CARGO_HOME='' doas emerge librsvg works fine.

gyakovlev commented 2 years ago

I don't know why it happens: CARGO_HOME variable is in ENV_UNSET list, means if the package is EAPI=7 or later - portage will always unset this variable. we don't support any EAPI before 7 right now in cargo.eclass.

It has been added back in 2020.

https://github.com/gentoo/gentoo/commit/d5370bc17d73a62f1a3f1bc09b4c7847da507317

so please check that you are using up-to-date portage and up-to-date eclass and packages.

mazunki commented 2 years ago

Thanks for the answer, @gyakovlev !

gnome-base/librsvg-2.54.0::gentoo, which is the latest upstream, seems to be using EAPI=6, explaining why it happens, so I'll just close this issue then. :)

I might try to build with a later EAPI version in a few days, and see if that solves the problem. Are there any guides/knowhows to what to keep in mind, why it hasn't been done already?