Bug#578852: prohibit usage of Breaks for file conflicts
On Fri, 2010-04-23 at 10:51:56 +0200, Goswin von Brederlow wrote:
> Package: debian-policy
> Version: 126.96.36.199
> Severity: normal
> to test the actual behaviour of dpkg for this situation I created the
> following 5 packages:
> Test 1
> I start with version 1 installed and update to version 2/2b/2c without
> problems. Then on downgrade:
> mrvn@frosties:~/t% sudo dpkg -i foo_1_all.deb
> dpkg: warning: downgrading foo from 2 to 1.
> (Reading database ... 176361 files and directories currently installed.)
> Preparing to replace foo 2 (using foo_1_all.deb) ...
> Unpacking replacement foo ...
> dpkg: error processing foo_1_all.deb (--install):
> trying to overwrite '/usr/share/doc/foo/foo.control', which is also in package bar 0:2b
> Errors were encountered while processing:
> SEE http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=20471
No, this is #568566, and fixed in 1.15.7 with:
I found out this bug some weeks ago by code staring, and only matched
it against an actual bug report recently, initially thought it would
fix some failing test-cases about disappearing packages in the dpkg's
pkg-tests.git functional test suite, but it ended up being something
This was “introduced” in dpkg 1.13.2 (2005-03-18) when fixing #164595
by forgetting to handle the versioned downgrade case, for something
that had not been supported before.
> In conclusion:
> On downgrades using Replaces with Breaks triggers a long standing dpkg
> bug or can cause files to disapear. So it might indeed be wise for
> policy to prohibit the use of Breaks for file conflicts. Even if the
> dpkg bug is fixed it still risks loosing files when reverting a
> partial upgrade and downgrading to the old versions.
There's the problem with downgrades and versioned Replaces, and there's
the other problem with disappearing the wrong replaced/replacing package
on reverse installation order and losing track of package ownership of
files, fixed also in 1.15.7 with:
Neither of these are triggered by Breaks nor Conflicts.
These test-cases can be found in: