Skip to content

Fix path remapping for crate dependencies

Ryan Gonzalez requested to merge wip/refi64/registry-paths into apertis/v2023dev2

When dh-cargo calls prepare-debian, it passes a registry folder under the cwd (debian/cargo_home), which means when path remapping takes place, the following occurs for all source files from the dependencies:

$PWD/debian/cargo_home/DEPENDENCY/... -> /usr/share/cargo/registry/DEPENDENT/debian/cargo_home/DEPENDENCY

The new paths do not actually exist on the filesystem. Instead, they should be pointing into:

/usr/share/cargo/registry/DEPENDENCY

which is where the crate's sources are actually located.


This patch was applied downstream from an MR submitted to Debian's cargo package:

https://salsa.debian.org/rust-team/cargo/-/merge_requests/13

Signed-off-by: Ryan Gonzalez ryan.gonzalez@collabora.com

https://phabricator.apertis.org/T8554

Edited by Andre Moreira Magalhaes

Merge request reports