A trivially conflicting package foo can be made to work with bar, by running dpkg --force-conflicts -i foo
. But eventually it's time to upgrade, and 'apt-get' objects:
% apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
foo : Conflicts: bar but 0.2-1 is installed
E: Unmet dependencies. Try using -f.
Can apt-get be tweaked/forced to tolerate the (pretty much fixed) conflict, then upgrade?
(Quickie existence proof: uninstall foo, then upgrade, then reinstall foo as before. Therefore it is possible, the question is finding the least cumbersome mechanism.)
An example, but this question is not about any two particular packages.
For several years GNU parallel has had a trivial conflict with moretutils; each provides /usr/bin/parallel. dpkg can force co-existence:
# assume 'moreutils' is already installed, and 'parallel' is in
# apt's cache directory.
dpkg --force-conflicts -i /var/cache/apt/archives/parallel_20141022+ds1-1_all.deb
This creates a diversion, renames the moreutils version to /usr/bin/parallel.moreutils. Both programs work, until the user upgrades.
I tried an -o option, but that didn't bring on peace:
apt-get -o Dpkg::Options::="--force-conflicts" install parallel moreutils
Possible -o options number in the hundreds, however...
--forcing
things is generally a bad idea unless you know what you are doing.dpkg
andapt
are clearly unhappy with the current situation. And the only way to fix things is not have both of the packages installed. Thers is no good way to placate them, and trying to do so will not lead anywhere.