reassign -1 dh-rust
found -1 0.0.10
affects -1 src:oxigraph
retitle -1 dh-rust: installs lib crates in non-deterministic and fallable order
severity -1 serious
thanks

Quoting NoisyCoil (2025-01-25 23:57:38)
> While rebuilding oxigraph for an upcoming bindgen update, the package FTBFS at
> the install stage with the following error:
[...]
>         cd lib/spargebra && cargo package --offline --allow-dirty --no-verify 
> --target-dir /build/reproducible-path/oxigraph-0.4.7/target --package 
> spargebra\@0.3.4
>    Packaging spargebra v0.3.4 
> (/build/reproducible-path/oxigraph-0.4.7/lib/spargebra)
> error: failed to prepare local package for uploading
> 
> Caused by:
>   no matching package found
>   searched package name: `oxrdf`
>   perhaps you meant:      oxiri or serde
>   location searched: directory source 
> `/build/reproducible-path/oxigraph-0.4.7/debian/cargo_registry` (which is 
> replacing registry `crates-io`)
>   required by package `spargebra v0.3.4 
> (/build/reproducible-path/oxigraph-0.4.7/lib/spargebra)`
>   As a reminder, you're using offline mode (--offline) which can sometimes 
> cause surprising resolution failures, if this error is too confusing you may 
> wish to retry without the offline flag.
> dh_auto_install: error: cd lib/spargebra && cargo package --offline 
> --allow-dirty --no-verify --target-dir 
> /build/reproducible-path/oxigraph-0.4.7/target --package spargebra\@0.3.4 
> returned exit code 101

This is a bug in dh-rust.

Crates in a multi-crate workspace may depend on each other.

dh-rust hooks into the debian/rules make target `dh_auto_install`, where
for each handled crate it calls `cargo install` for the crate and then
registers the crate with the local crate registry.  This means that the
order of processing crates is important.

Currently, dh-rust simply orders by amount of dependencies.  This bug
demonstrates that that approach was too optimistic, and proper graph
computing of interdependencies is required.

Thanks for reporting!

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to