prevent MarkInstall of unsynced Multi-Arch:same siblings
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 10 Jul 2013 11:06:05 +0000 (13:06 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 11 Jul 2013 16:42:54 +0000 (18:42 +0200)
commit486d190d3c66bb7271509dc002f8ec9e9eb0166c
tree171b341a7caa4c82f47ce007ddb41fccb58f6faa
parent3d1be93dc4242df2b93de632715a8aa7dd34f96f
prevent MarkInstall of unsynced Multi-Arch:same siblings

Multi-Arch: same packages can be co-installed, but need to have the same
version for all installed packages (aka "siblings"). Otherwise the
unsynced versions will fight against each other and the auto-install as
wel as the problem resolver will later have to decide between holding the
packages or to remove one of the siblings (usually a foreign) taking a
bunch of packages (like the entire foreign setup) with them.

The idea here is now to be more pro-active: MarkInstall will fail for
a package if the siblings aren't synced, so we don't allow a situation
in which a resolver has to decide if to hold or to remove-upgrade under
the assumption that the remove-upgrade decision is always wrong and
doesn't deserve to be explored (expect valid out-of-syncs of course).

Thats a pretty bold move to take for a library which is used by
different solvers so this check is done in IsInstallOk and can be
overridden if front-ends want to.
apt-pkg/depcache.cc
apt-pkg/depcache.h
test/integration/test-prevent-markinstall-multiarch-same-versionscrew [new file with mode: 0755]