On July 15, 2022 10:59 pm, Daniel Kahn Gillmor wrote: > Package: librust-curl-sys-dev > Version: 0.4.49-1 > Control: affects -1 src:rust-debcargo librust-curl-dev > > There's a build loop between librust-curl-dev and librust-curl-sys-dev > in debian: when i "cargo build" anything that depends on the curl crate, > it causes a rebuild of curl-sys, which in turn causes a rebuild of curl > on the next build. So "cargo build" always has to do more building than > it should. > > [.. reproducing instructions omitted..] > > OTOH, if i remove the .cargo/config.toml (so that it pulls from > crates.io directly) i do not see the rebuild happening for either curl > or curl-sys. subsequent "cargo build" operations just terminate > cleanly, even if i pin the versions of curl and curl-sys in Cargo.toml. > > This is likely related to "cargo:rerun-if-changed=curl" in build.rs for > librust-curl-sys-dev (see > https://github.com/alexcrichton/curl-rust/pull/407) but I don't > understand it. > > But when i asked on ##rust on libera's IRC service, folks there not > using debian were unable to reproduce this problem.
note that the rerun line upstream refers to the vendored copy of the curl library which is contained as a git submodule (and directory, in the published .crate file) - to pick up any changes made to the submodule during development. we do (obviously ;)) remove that directory in Debian[0], which then makes the reference to 'curl' point to the 'curl' crate. but, we also patch out the println[1]. seems like that fixed version never got uploaded though - but that would likely fix it. note that I am currently working on upgrading cargo/debcargo which will also entail updating curl-sys and curl, so if you want to wait for that (ETA ~1 week) instead of uploading the prepared -2 that should also fix it in due course, but I am happy to rebase on top of a finalized -2 version as well :) 0: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/curl-sys/debian/debcargo.toml#L3 1: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/curl-sys/debian/patches/avoid-spurious-rebuilds.patch