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

Re: Cross-upgrading packages with multiarch packages



On Fri, Feb 18, 2011 at 12:31:18PM +0100, Raphael Hertzog wrote:

> I'd like to seek feedback about what kind of upgrades dpkg should support
> with multi-arch packages.

> dpkg treats foo:native and foo:all like the same package and it's thus
> possible to upgrade foo_1.0_all to foo_2.0_<native> and vice-versa.

> However if you have installed foo_1.0_<foreign>, you can't upgrade that
> package to foo_2.0_all (and vice-versa). Same goes for foo_1.0_<foreign1> to
> foo_1.0_<foreign2> (provided they are not multi-arch: same, otherwise they
> could coexist). You have to remove the conflicting package first and
> reinstall afterwards.

> In a similar vein, if you have several instances of the same package
> (Multi-Arch: same, say foo_1.0_<native> and foo_1.0_<foreign>), you can't
> install foo_2.0_all because it's in conflict with foo_1.0_<foreign>.

> Is this behaviour what we want?

I think that actually sounds entirely reasonable.  If you have
foo_1.0_native, foo_1.0_foreign installed, and you try to install
foo_2.0_all, which package is it an upgrade of?  I don't think it makes
sense from dpkg's POV to be a simultaneous upgrade of *both* packages.  So
it's an upgrade of foo_1.0_native, and should be handled the same way as you
would handle an attempt to upgrade to foo_2.0_native without also upgrading
to foo_2.0_foreign.

Higher-level package managers should detect this and do the needful. 
foo_1.0_foreign should be removed as part of the upgrade, solving the
conflict and allowing foo_2.0_all to be configured.

So yeah, that seems ok to me, but I guess you're not convinced or you
wouldn't have asked. :)  What other way do you see this working?  Should
dpkg auto-remove multiarch packages when an upgrade to _all is requested?
That seems very inconsistent with dpkg's "do what I say" approach, IMHO.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: