chimera-linux / cports

Chimera ports collection
BSD 2-Clause "Simplified" License
180 stars 121 forks source link

`build_style = "cargo"` doesn't respect `make_dir` #3094

Open z-erica opened 1 week ago

z-erica commented 1 week ago
0:00:01.276 => yabridgectl-5.1.0-r0: running prepare...
[vendoring etc]
0:00:02.068 => yabridgectl-5.1.0-r0: running patch hook: 000_patches...
0:00:02.070 => yabridgectl-5.1.0-r0: running setup hook: 000_env_pkg_config...
0:00:02.072 => yabridgectl-5.1.0-r0: running setup hook: 001_lang_vers...
0:00:02.073 => yabridgectl-5.1.0-r0: running build...
warning: `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition
(in the `goblin` dependency)
error: failed to get `anyhow` as a dependency of package `yabridgectl v5.1.0 (/builddir/yabridgectl-5.1.0/tools/yabridgectl)`

Caused by:
  failed to load source for dependency `anyhow`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  failed to update replaced source registry `crates-io`

Caused by:
  failed to read root of directory source: /builddir/yabridgectl-5.1.0/vendor

Caused by:
  No such file or directory (os error 2)

this happens because the vendored sources are placed in {self.make_dir}/vendor but the .cargo directory is created in the template srcdir

z-erica commented 1 week ago

note that setting build_wrksrc instead doesn't work either, since the prepare phase (which runs cargo vendor) still runs from the template srcdir