Re: rust-*/librust-* arch:any vs. arch:all and cross-compilation support
On Mon, Feb 20, 2023 at 06:44:23PM +0100, Jonas Smedegaard wrote:
> I don't see a need for such general rule for all librust-*-dev packages.
This definitely is a trade-off. Hence I asked about what we should do
> E.g. librust-futures-timer-dev and librust-event-listener-dev has no
> dependencies so should be safe to distribute as arch-all and marked as
> m-a:foreign, right?
Yeah, I mentioned librust-typenum-dev earlier and you found more. I
expect that there are probably hundreds of pure rust libraries without
dependencies. Really, the only reason to not have them arch:all is
mitigating the risk of changing dependency trees.
> Sure, there is a theoretical risk that some day in the future those
> packages grow dependencies that require changing that, but isn't that
> the case generally for m-a hinting?
You are entirely correct about this. It definitely is a heuristic.
> I guess it makes sense instead to have a lintian warning for packages
> marked m-a:foreign that all its dependencies are equally marked (or if
> that's unreasonably expensive then check only one level deep). That
> should help flag misuses of m-a:foreign including this one of mine (for
> most but not all the librust-*-dev packages that I maintain).
lintian does not have the full picture. It looks at one source package
plus all of its binary packages in isolation. It cannot see the
multi-arch annotations of dependencies. Hence the multi-arch hinter was
added as an extra component outside lintian. On the flip side, the
hinter could do the flagging that you suggest here. In essence, it could
flag all packages satisfying all of the following conditions:
* Architecture: all
* Multi-Arch: foreign
* Package: librust*-dev
* Depends: some package that is not m-a:foreign
We can actually express this in SQL:
FROM indeppackage AS i
WHERE name LIKE 'librust%-dev'
AND multiarch = 'foreign'
AND EXISTS (SELECT 1 FROM archdepcandidate AS c WHERE c.dependerid = i.id);
I guess you're also interested in the output of the query.
As a confirmation of Fabian's observation, this list includes
librust-serde-fmt-dev. Note that this is not transitive yet. After
fixing these, some reverse dependencies will be added to the list. Also
note that running this query on delfin.d.o cannot be easily done by DDs
yet, because the underlying sqlite database uses wal mode. Sorry about
Should the hinter generate reverse hints for these and thus issue action
items on tracker.d.o?