Here is a script to recreate this error by corrupting the package cache of apt. 
_DON'T RUN IT ON A PRODUCTION SYSTEM_

The only way to reproduce it is when pkgcache.bin and dpkg status are
out of sync. In the script I intentionally corrupt pkgcache.bin and the
status database but I don't see how this can happen in the real world.

>From the dpkg log, it seems that it has to do with triggers and when
both a package and its dependencies set the same trigger, and the error
seems to always follow a system crash. But I don't know if the trigger
execution is not shown into the dpkg log because the write to the log
was buffered and not dumped to the log file or because the trigger was
really not executed. Furthermore, I don't know if the trigger is what
causes the error or if the error is elsewhere and the trigger only
'triggers' the error.

It might be a missing msync in apt or a deferred write of the
pkgcache.bin.


** Attachment added: "break_apt2.sh"
   
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595/+attachment/1911680/+files/break_apt2.sh

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/541595

Title:
  [Master] package failed to install/upgrade: package is already
  installed and configured

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to