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

Re: dpkg: native package in rc state prevents installation of m-a:foreign counterpart



On Sat, 2012-07-21 at 22:30:30 -0500, Jonathan Nieder wrote:
> Guillem Jover wrote:
> > On Sun, 2012-07-22 at 04:37:02 +0200, Arno Schuring wrote:
> 
> >> dpkg: error processing /var/cache/apt/archives/libwine_1.4.1-2_i386.deb
> [...]
> >> rc  libwine:amd64   1.4.1-1.2    Windows API implementation - library
> >> ii  libwine:i386    1.4.1-1.2    Windows API implementation - library
> [...]
> > Yes, that's on purpose, otherwise the database could end up with
> > multiple instances of non-coinstallable packages, which would break
> > lots of internal and external assumptions.
> 
> How does crossgrading normally work?

Cross-grading happens whenever a new package instance is installed
with a different architecture from the current single instance, as
long as both old and new are not M-A:same, or they switch from
non-M-A:same to M-A:same or the reverse.

> If Arno had not had libwine:i386 installed, would the upgrade have worked?

Yeah (assuming not-installed == not-present), that would have been a
cross-grade. Because the old one is M-A:same and the new one is
M-A:foreign.

> [...]
> > Yes, this appears to be a problem with apt, reassigning as such.
> 
> What dpkg commands should apt run to upgrade from this state?

In this particular case, apt would need to check that there's no multiple
instances present if the new package is switching from M-A:same to
non-M-A:same. And in that case notify the user that the package instance
in config-files state would need to be purged.

But I don't think apt would need to really learn about cross-grading to
handle this particular case though, only when multiple instances are
not allowed while installing a new version.

thanks,
guillem


Reply to: