Comment 1 for bug 739151

Revision history for this message
Wookey (wookey) wrote : Re: [Bug 739151] [NEW] dpkg-cross does not do sensible things with multi-arch: same packages

+++ Steve Langasek [2011-03-21 05:06 -0000]:
> Public bug reported:
>
> Binary package hint: dpkg-cross
>
> Running dpkg-cross against the Multi-Arch: same version of libc6
> currently in natty does not produce sensible output. Instead it
> generates a .deb that contains only a large number of iconv .so modules
> under /usr/x86_64-linux-gnu/include, e.g.:
>
> ./usr/x86_64-linux-gnu/include/gconv/libCNS.so
>
> I have no idea why it's installing to include. The source location was
> ./usr/lib/x86_64-linux-gnu/gconv/.

You're quite right - it does indeed do that.

> It might seem that it's not a big deal for dpkg-cross to not handle
> multiarch packages since multiarch packages can just be installed
> directly; but since we can't use foreign-architecture build dependencies
> on the buildds yet, cross-toolchain packages in the archive (such as
> armel-cross-toolchain-base) need to build using gcc-4.5-source, eglibc-
> source, etc. and run dpkg-cross afterwards to output their binary
> packages.

<fx: looks at armel-cross-toolchain-base code>

Hmm. I see.

In general the right thing for dpkg-cross to do with multiarch
packages is nothing, at least in terms of moving files about. What you
want here is the ability to leave the files just where they are but
still have the 'make a package for a different arch' functionality?

Or do you in fact want the functionality of moving files into the
'old' locations even if they start in the multiarch ones (because
something about the build process needs it)? That seems very horrid

> I've checked with dpkg-cross 2.6.2 from Debian unstable; the same
> problem is present there.

The multiarch behaviour of what's in cvs (2.6.3) is different from 2.6.2. It
essentially tries to do nothing.

$ dpkg-cross -b -a amd64 libc6_2.13-0ubuntu8_amd64.deb
dpkg-cross: Skipping the 'libc6_2.13-0ubuntu8_amd64.deb' Multi-Arch package.

So that's better than the previous messing it up, and is a prefectly
reasonable way of fixing this bug. (i.e now it does something
sensible). But that doesn't help armel-cross-toolchain-base.

> So the armel cross-compiler in the archive isn't buildable
> until this is resolved.

I think we can all agree that the _correct_ fix for this is to allow
cross-arch dependencies and have the cross-toolchains built in a less-gross
way, but as we're not going to be there for a bit it seems like
allowing dpkg-cross --convert-anyway to make
libc6_2.13-0ubuntu8_amd64.deb into
libc6-amd64-cross_2.13-0ubuntu8_all.deb
might be a reasonable things to do.

--convert-anyway is currently used for 'convert when the package would
otherwise be null'. Extending it to cover 'convert even when it
multiarch and normally we'd do nothing' doesn't seem unreasonable. Can
anyone think of a reason why a different option (--force-cross?) should
be used?

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/