[Pkg-rust-maintainers] Bug#984627: debcargo: should ignore build-dependencies that are marked cfg(target_env = "msvc")

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Mar 6 00:00:19 GMT 2021


Package: debcargo
Version: 2.4.4-1
Control: affects -1 src:rust-nettle-sys

in Cargo.toml from nettle-sys 2.0.5, we see:

[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
version = "0.2.9"


But debcargo 2.4.4 translates that into actual Build-Depends: and
Depends: fields, despite the target environment not being the MSVC
compiler.  It generates:

-----
Source: rust-nettle-sys
Section: rust
Priority: optional
Build-Depends: debhelper (>= 12),
 dh-cargo (>= 24),
 cargo:native <!nocheck>,
 rustc:native <!nocheck>,
 libstd-rust-dev <!nocheck>,
 librust-bindgen-0.55-dev <!nocheck> | librust-bindgen-0.54-dev <!nocheck> | librust-bindgen-0.53-dev (>= 0.53.1-~~) <!nocheck>,
 librust-pkg-config-0.3+default-dev <!nocheck>,
 librust-vcpkg-0.2+default-dev (>= 0.2.9-~~) <!nocheck>,
 nettle-dev (>= 3.5.1~~) <!nocheck>,
 llvm
Maintainer: Debian Rust Maintainers <pkg-rust-maintainers at alioth-lists.debian.net>
Uploaders:
 Daniel Kahn Gillmor <dkg at fifthhorseman.net>,
 kpcyrd <git at rxv.cc>
Standards-Version: 4.5.1
Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/nettle-sys]
Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/nettle-sys
Rules-Requires-Root: no

Package: librust-nettle-sys-dev
Architecture: any
Multi-Arch: same
Depends:
 ${misc:Depends},
 librust-bindgen-0.55-dev | librust-bindgen-0.54-dev | librust-bindgen-0.53-dev (>= 0.53.1-~~),
 librust-pkg-config-0.3+default-dev,
 librust-vcpkg-0.2+default-dev (>= 0.2.9-~~),
 nettle-dev (>= 3.5.1~~)
Provides:

-----

So, i'll probably patch this out of the upstream sources for now, but
debcargo should have handled this more cleanly.

       --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20210305/c60a8213/attachment.sig>


More information about the Pkg-rust-maintainers mailing list