On Thu, 2026 Dec  3 14:46-05:00, Fabian Grünbichler wrote:
>
> Nit: it's not gone from the unpacked source tree, just from the source
> tree once the build has started.
>
> I see the argument for keeping it around (moved away) and restoring it
> in clean, if just for idempotency reasons.

Right; the file is there initially after the unpack, but then disappears
with the first build. (Which is unusual behavior in and of itself.) And
having the "clean" action fully restore the tree to the pre-build state
is the ideal.

> That being said - if you vendor crates, you don't need to use dh-cargo,
> since the only purpose of dh-cargo is to provide non-vendored crates,
> and set cargo up to use them ;) in that situation, you probably want
> to just use the cargo wrapper (that dh-cargo calls) directly..

There's an advantage in having d/rules be largely the same between using
packaged crates versus vendored ones. For my part, I'm actually
"converting" Debian Rust packages to use vendored crates, for the
purpose of Ubuntu backporting. Ubuntu's additions to dh-cargo allow me
to just set CARGO_VENDOR_DIR appropriately, and then the build proceeds
with the vendored deps. Having to re-write d/rules to enable that would
be quite a bit more work.

Reply via email to