Comment 22 for bug 1015567

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1015567] Re: upgrade failed: mixed non-coinstallable and coinstallable package instances present

On 26 September 2012 13:47, Michael Vogt <email address hidden> wrote:
> Alternatively to the above patch I guess we could count
> state_conffigfiles differently as its own count: { single, multi, total
> } -> { single, multi, confonly, total}
>

I'm not sure this is needed. The check is counting installed packages:
* if there is only 1 version of the package installed it can be either
multi/single
* if there is 2 version installed we can have:
- OK both multi-arch
- OK one multi-arch the other one confonly
- OK both are single and confonly simultaniously (FREAKY)
- FAIL both are single and installed (VERY FREAKY)

But I do hope that it is hard to trick dpkg into having two
non-multiarch versions of the same package installed simultaneously,
at the start of a dpkg run when it is trying to find slots in the
database. I guess we could make it safer and count {single:installed,
single:conf, multi:installed, multi:conf, total} and add more asserts.
To me that would be excessive.

I have run your patch through my test/mock script to recreate this
state and it worked ok. Thanks.

As per IRC, I have opened
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1057367 to
actually upgrade the database as per original infinity's solution,
instead of keeping this workaround forever.

Regards,

Dmitrijs.