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

Re: An introduction to multiarch

Steve Langasek <vorlon@debian.org> writes:

> Hi Goswin,
> On Sat, Jul 25, 2009 at 11:57:12PM +0200, Goswin von Brederlow wrote:
>> 4) Implementation (migration)
>> For most users activating multiarch would be a simple matter of
>> putting
>> Apt::Architectures {"amd64"; "i386";};
>> in /etc/apt/apt.conf.d/multiarch (or any other apt conffile). This
>> could also be done with a "multiarch" package that could auto detect
>> possible architectures or ask with debconf.
> I don't think this configuration belongs to apt, I think it belongs to dpkg.

I disagree, at least to a degree.

In dpkg there should be a configuration of architectures that are
possible on the system. Architecture the system is capable of
running. So on amd64 dpkg would default to amd64,i386 as those
architectures can be run natively. qemu-powerpc (or whatever it would
be called) would add ppc to the list of executable architectures
(however dpkg will allow that) and setup the binfmt-misc stuff needed
to run powerpc binaries in qemu. If the admin runs "dpkg -i
foo_i386_1.2-3.deb" on amd64 then I assume he does want that i386 deb
even if he hasn't configured multiarch for everything. I don't think
dpkg should block that.

On the other hand in apt you configure what architectures you actively
want to use. What Packages.gz files should be downloaded and so on.
That list of architectures can differ from the architectures dpkg
allows and I think that setting belongs to apt.

But if the dpkg team introduces a setting for wanted architectures in
dpkg then apt can certainly be patched to take its clue from there
too. Minor implementation detail. Only problem is that there is no
/etc/dpkg/cpkg.cfg.d/ directory for packages to drop sniplets in. Your
argument right below works with apt but dpkg will need something new
for it. But then again dpkg needs something new so a qemu-powerpc can
tell dpkg that now powerpc binaries are also executable.

> Also, there will probably need to be a way to merge architecture
> declarations from multiple files, to allow individual packages to ship
> conffiles enabling a corresponding arch.

Setting (e.g. /etc/apt/apt.conf.d/qemu-powerpc)
  Apt::Architectures:: "powerpc";
will add powerpc to the list. Works like a charme. Already considered
that too.

>> Migrating ia32-libs, ia32-libs-gtk and amd64-libs will be tricky if
>> not impossible to automate. The release notes might have to say that
>> the user has to replace all packages depending on them with the
>> respective i386 or amd64 packages after enabling multiarch.
> Yes; I don't expect/intend for this to be a blocker.
> Cheers,

No. I'm perfectly fine with having a section in the release notes on
how to go from ia32-libs to multiarch manually. Even saying "purge
ia32-libs, activate multiarch, reinstall 32bit stuff" should not be a
blocker even if slightly inconvenient. But it is something people
should be aware of and think about. Maybe someone can thing of a nice


Reply to: