Re: dpkg behavior while changing a foreign package from arch:any to arch:all (and v.v.)
On Fri, 10 Feb 2012, David Kalnischkies wrote:
> I am not sure through if this is really a bug in dpkg, given that arch:all is
> to be interpreted as arch:native in multiarch, so on an amd64 system a
> flip from arch:amd64 to arch:all is not really a flip (and therefore works)
> while arch:i386 to arch:all is not (and therefore doesn't work).
> So this might be very well the intended behavior and not a bug.
At the very least it was coded that way and the test suite ensures that
this is the case:
# M-A: $* / Upgrade from arch: any-foreign -> all
$(DPKG_INSTALL) pkg-ma-$*_1.0_$(FOREIGN_ARCH).deb
! $(DPKG_INSTALL) pkg-ma-$*_1.0_all.deb
$(call pkg_is_installed,pkg-ma-$*:$(FOREIGN_ARCH))
$(call pkg_is_not_installed,pkg-ma-$*)
$(DPKG_PURGE) pkg-ma-$*:$(FOREIGN_ARCH)
[...]
# M-A: $* / Upgrade from arch: all -> any-foreign
$(DPKG_INSTALL) pkg-ma-$*_1.0_all.deb
! $(DPKG_INSTALL) pkg-ma-$*_1.0_$(FOREIGN_ARCH).deb
$(call pkg_is_not_installed,pkg-ma-$*:$(FOREIGN_ARCH))
$(call pkg_is_installed,pkg-ma-$*)
$(DPKG_PURGE) pkg-ma-$*
The reasoning is precisely the one you gave. It's also coherent
with the current impossibility to cross-grade an "Architecture: any /
Multi-Arch: foreign/no" package from native to foreign and vice-versa.
This is just one reason more that we have to change this at some point
to properly support cross-grades from one arch to the other.
> Somehow I get the impression it would be good to have an option in dpkg
> to tell dpkg what it should consider as "native" architecture similar to
> APT::Architecture to easily solve these kind of communication problems.
Hum, I had not thought of that. It could also be useful to use the host's
dpkg in a chroot of a foreign architecture. Or to use a foreign dpkg for
some reasons (perf? availability?) and still assume the system is running
some other arch by default.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/
Reply to: