Re: cross compilation: dev packages depending on rustc
On Tue, Feb 13, 2024 at 09:54:34PM +0100, Johannes Schauer Marin Rodrigues wrote:
> Hi,
>
> Quoting James McCoy (2024-02-13 20:19:13)
> > On Tue, Feb 13, 2024 at 07:42:41PM +0100, Johannes Schauer Marin Rodrigues wrote:
> > > I was wondering what this dependency on rustc is for and why it is
> > > necessary. If packages shipping C header files would depend on gcc, the
> > > same thing would happen.
> > >
> > > Can you shed some light on the situation?
> >
> > This is because the crate states that its minimum rust version is 1.70.
> >
> > https://sources.debian.org/src/rust-gdk4/0.7.3-1/Cargo.toml/#L14
> >
> > Rust is in sort of a weird spot here. The library crates exist solely
> > to build actual binary crates. The package being built may not have a
> > minimum required Rust version, but the library crates that it
> > (transitively) Build-Depends on do, and that's what this is trying to
> > express.
>
> instead of using a Depends, could a Breaks be used like this:
>
> Breaks: rustc (<< 1.70), rustc (>> 1.70)
I was mistaken earlier. We only automatically generate the rustc
version constraint for Build-Depends and autopkgtests. These are
manually being declared, but presumably for a similar reason.
https://sources.debian.org/src/rust-gdk4/0.7.3-1/debian/debcargo.toml/#L5
I'll let Mattias comment on that.
> This would not draw in a rustc dependency but would make it impossible to
> install it together with the wrong rustc version.
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
Reply to: