dpkg config resolver: should have "Merge" capability

Bug #573168 reported by Buck Evan
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
dpkg (Debian)
Confirmed
Unknown
dpkg (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: dpkg

I'm certain this has been reported before, but I can't find the bug after much searching...

dpkg currently gives this message when it tries to install a configuration file over an customization:

Configuration file `/etc/configfile'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** issue (Y/I/N/O/D/Z) [default=N] ?

Given that we have a "base", "theirs" and "mine", it seems a simple change to add an "M: attempt to merge" option.

All of the 12 or so prompts I was given when upgrading to Lucid could have been resolved this way. Even if the merge fails and there are conflicts (unlikely), I would still prefer to resolve the conflict manually than blindly throw away either my or the maintainer's edits.

==== Implementation suggestion:

First prompt would look like this:

Configuration file `/etc/configfile'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      M : attempt to merge the differences
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** issue (Y/I/M/N/O/D/Z) [default=N] ?

If the merge fails with conflicts, bring up a second prompt:

Configuration file `/etc/configfile'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      M : manually resolve the conflicting differences
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** issue (Y/I/M/N/O/D/Z) [default=N] ?

Buck Evan (bukzor)
description: updated
Colin Watson (cjwatson)
Changed in dpkg (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Changed in dpkg (Debian):
status: Unknown → Confirmed
Revision history for this message
TomyLobo (tomylobo) wrote :

> Given that we have a "base", "theirs" and "mine", it seems a simple change to add an "M: attempt to merge" option.

The problem is that your Ubuntu (or Debian) system does not really have a "base" version of that conffile, only a checksum stored with the rest of the package information in /var/lib/dpkg/status.

That fact would either have to change first or you'd need the original package, which is usually available.

Storing each actual conffile might be prohibitively large amounts of space if you have bad packages.
That would be a decision that either needs to be taken by someone with an overview over these things or it has to be opt-in on a per system or per-package basis.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.