[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1028093: warn about python*-dev dependencies breaking cross compilation



On Fri, Jan 06, 2023 at 06:54:43PM +0100, Helmut Grohne wrote:
> Joe noticed a repetitive cross build failure. Can we turn that into a
> lintian check?
> 
> Preconditions
>  * A source package builds an architecture-dependent binary package.
>  * The package Build-Depends: python([0-9.]*|3?(-all))-dev without any
>    :native or :any qualifier.
> 
> The assumption is that in this case, the package very likely builds a
> Python extension module. For doing so, it needs a build architecture
> Python interpreter and a host architecture Python development package.
> This dependency however will cause both components to be installed for
> the host architecture and for the Python interpreter this tends to fail
> postinst.
> 
> Instead, it should be Build-Depends: &:native, lib& (where "&" is the
> package name previously used). The :native qualifier will cause the
> interpretr to be installed for the build architecture and the second
> dependency will pull the host architecture development package. For
> native builds, there is no difference as the first package depends on
> the second.
> 
> This transformation is quite mechanical, affects many packages and helps
> cross building a lot. I suppose that this could be automated by the
> janitor.

>From the Janitor's point of view, it would be easiest if these were included in
the multi-arch hint output (perhaps as a new type of hint) - since then it
would just be another case to handle in apply-multiarch-hints.

Cheers,

Jelmer


Reply to: