Re: Multiarch preparations needed for etch dpkg
Steve Langasek <firstname.lastname@example.org> writes:
> On Sat, May 27, 2006 at 01:07:01AM +0200, Goswin von Brederlow wrote:
>> Steve Langasek <email@example.com> writes:
>> > On Mon, May 22, 2006 at 10:07:00AM +0200, Goswin von Brederlow wrote:
>> >> Only the "dpkg:arch" is required and that can be done with "Provides:
>> >> dpkg-arch" again.
>> > Right. I wonder if even this should strictly be necessary, though, or if
>> > dpkg shouldn't be able to provide the needed features for build-essential in
>> > any architecture version...
>> The problem is that dpkg has the default architecture hardcoded in the
>> binary and that can't be changed without large side effects.
>> If we allow an amd64 dpkg to behave like an i386 dpkg then I bet
>> people will start messing things up and build i386 debs on amd64
>> systems and complain why they can't build amd64 debs.
>> Keeping the architecture hardcoded in dpkg and have the architecture
>> of the dpkg (dpkg-dev?) package decide what architecture to build for
>> seems a simple solution.
>> But that is just me. And I'm also to lazy to dig through dpkg source
>> to make it provide the same behaviour for any arch.
> Well, since the whole reason we would need to declare a dpkg-dev:arch
> dependency is that dpkg-dev is *not* going to be a multiarch package, having
> such a dependency makes it impossible for (e.g.) build-essential:i386 and
> build-essential:amd64 to be co-installable, right? That seems unfortunate
> to me.
Yes. I don't think it would be wise to have build-essential be
coinstallable for multiple archs.
Note: dpkg-dev is architecture all. The dpkg package itself determines
the native architecture for a system. I guess it wouldn't be too hard
to add a /etc/dpkg/architectures file that sets the native
architecture for building packages, the prefered architecture when
installing packages and any compatible architectures allowed on the
system. We already need some config option to allow/disalow
architectures in case you don't want multiarch.
> Assuming no one comes up with a brilliant^Wcrazy plan to make dpkg-dev
> autoselect the default architecture based on something like the Linux
> personality, I would figure that the sensible thing here is to require
> anyone trying to build packages for a non-default arch to declare this arch
> using the -a option to dpkg-buildpackage.
You can't set your linux personality to i386 on ppc or alpha but
people wanted to use qemu to install and run i386 packages
there. There is also the case of switching between glibc and uclibc
that isn't reflected in the personality. This needs something more
than the "linux32/64" binary.