Debian Bug report logs - #32877
[CONFFILE] Cleverer conffile merge

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg.

Reported by: Jules Bean <jmlb2@hermes.cam.ac.uk>

Date: Thu, 4 Feb 1999 15:18:00 UTC

Severity: wishlist

Tags: patch, upstream

Merged with 48717, 120152, 189805, 247336, 268154, 290854, 294073, 413436, 440640, 473996, 548663, 578804

Found in versions dpkg/1.13.22, dpkg/1.13.25, dpkg/1.15.3.1, dpkg/1.15.5.6

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Jules Bean <jmlb2@hermes.cam.ac.uk>:
New bug report received and forwarded. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jules Bean <jmlb2@hermes.cam.ac.uk>
To: submit@bugs.debian.org
Subject: Cleverer conffile merge
Date: Thu, 4 Feb 1999 15:04:25 +0000 (GMT)
Package: dpkg
Severity: wishlist

When dpkg notices that a conffile has changed, it could rather helpfully
offer the option of using the merge command.

The command-line dpkg would use is

merge <conffile>.dpkg-new <conffile>.dpkg-dist <conffile>

Which, in merge speak, means

Check (linewise) for differences between <conffile>.dpkg-dist and
<conffile>.  Apply such differences to <conffile>.dpkg-new.

Dpkg could then use merge's exit code to find out whether there were any
conflicts, and recommend that the user check the file if there were - or
better still, launch $VISUAL for the user to do it themselves.

This won't work with all config files, but would definitely enhance dpkg's
usability.

The maintainer may wish to merge this bug with #1921.  #1921 claims that
dpkg doesn't keep the whole config file around - but when I was correcting
by hand, I found a <conffile>.dpkg-dist which did exactly this, so I don't
quite know the details here.

Jules Bean

/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/



Information forwarded to debian-bugs-dist@lists.debian.org, Wichert Akkerman <wakkerma@debian.org>:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Chris Waters <xtifr@dsp.net>:
Extra info received and forwarded to list. Copy sent to Wichert Akkerman <wakkerma@debian.org>. Full text and rfc822 format available.

Message #10 received at 32877@bugs.debian.org (full text, mbox):

From: Chris Waters <xtifr@dsp.net>
To: 32877@bugs.debian.org
Cc: Jules Bean <jules@debian.org>
Subject: ideas on conffile merge for dpkg
Date: 03 Jun 2000 14:58:37 -0700
I was just browsing the BTS to see if a bug report such as this had
been filed.  Since it has, I'll file my suggestions as an addition to
the existing report.  I've cc'd this to the original submitter of
#32877.

First, to restate the problem so that it's clear:  when you install a
package with conffiles which have been edited, dpkg will offer to let
you use the old or the new, or see the diffs.  What is notably lacking
is an option to merge the changes.

Now, the original report suggested using the merge program.  There are
two disadvantages to that:  1. merge is part of the rcs package, so
dpkg would have to pre-depend on rcs, which I don't think we want, and
2. merge isn't always successful, and resolving the matter when it
fails is something that requires experience and skill.  Dumping a
newbie into an editor with what is, essentially, a broken and probably
unusable config file, and expecting him or her to fix it is
unreasonable.

My suggested approach is as follows:

Allow the user to specify the action to take when there is a
conflict.  If the user specifies such an action, then a M]erge choice
will appear on the dpkg menu.  If the user does not specify such an
action, no such choice will appear (the menus will remain as they are
now).

Some people might like to just use their editor (esp. those who like
emacs's interactive merge tool).  Others might want to use patch, if
they have that but not rcs's merge.  Still others might just want the
freedom of the shell (^Z will get you there, but with no easy way to
find the old and new conffiles' names).

So, say, there could be a file /etc/dpkg/mergeconf.  If it doesn't
exist (or isn't executable), dpkg would ignore it and act the way it
does at present; otherwise, dpkg would offer the M]erge choice, and,
if chosen, would call /etc/dpkg/mergeconf with the names of the
relevent files as arguments.  The contents of /etc/dpkg/mergefile
would be user-defined, but we could offer some useful examples.
-- 
Chris Waters   xtifr@dsp.net | I have a truly elegant proof of the
      or    xtifr@debian.org | above, but it is too long to fit into
http://www.dsp.net/xtifr     | this .signature file.



Information forwarded to debian-bugs-dist@lists.debian.org, Wichert Akkerman <wakkerma@debian.org>:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Michel Dänzer <daenzer@debian.org>:
Extra info received and forwarded to list. Copy sent to Wichert Akkerman <wakkerma@debian.org>. Full text and rfc822 format available.

Message #15 received at 32877@bugs.debian.org (full text, mbox):

From: Michel Dänzer <daenzer@debian.org>
To: 32877@bugs.debian.org
Cc: Jules Bean <jules@debian.org>, Chris Waters <xtifr@dsp.net>
Subject: Yet another slightly different suggestion :)
Date: 23 Dec 2001 18:29:01 +0100
dpkg doesn't have to depend on rcs. It could recommend or suggest it,
and only offer merging the conffiles if merge is available. I don't see
the need for a configuration option. (BTW how are the diffs handled? I
don't see any package relationship to diff)

Obviously, a conffile should never be in a corrupt state, which would
probably be the case if there are conflicts, so I think the merge should
go into a new file with e.g. a .dpkg-merge suffix, where the admin can
resolve any conflicts and then move it over. The conffile itself should
be left alone or optionally replaced with the new version from the
package if the admin wishes so.

I'll probably dig into the code sooner or later, but I suspect people
who know the code could do this much quicker and better than I.


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast



Information forwarded to debian-bugs-dist@lists.debian.org, Wichert Akkerman <wakkerma@debian.org>:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Wichert Akkerman <wichert@wiggy.net>:
Extra info received and forwarded to list. Copy sent to Wichert Akkerman <wakkerma@debian.org>. Full text and rfc822 format available.

Message #20 received at 32877@bugs.debian.org (full text, mbox):

From: Wichert Akkerman <wichert@wiggy.net>
To: Michel D?nzer <daenzer@debian.org>, 32877@bugs.debian.org
Subject: Re: Bug#32877: Yet another slightly different suggestion :)
Date: Sun, 23 Dec 2001 18:41:05 +0100
Previously Michel D?nzer wrote:
> I'll probably dig into the code sooner or later, but I suspect people
> who know the code could do this much quicker and better than I.

The plan is to keep the original conffile in the dpkg database so
we can do a more useful merge actually.

Wichert.

-- 
  _________________________________________________________________
 /wichert@wiggy.net         This space intentionally left occupied \
| wichert@deephackmode.org            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |



Acknowledgement sent to Michel Dänzer <daenzer@debian.org>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #23 received at 32877-quiet@bugs.debian.org (full text, mbox):

From: Michel Dänzer <daenzer@debian.org>
To: Wichert Akkerman <wichert@wiggy.net>
Cc: 32877-quiet@bugs.debian.org
Subject: Re: Bug#32877: Yet another slightly different suggestion :)
Date: 23 Dec 2001 18:55:24 +0100
On Sun, 2001-12-23 at 18:41, Wichert Akkerman wrote:
> Previously Michel D?nzer wrote:
> > I'll probably dig into the code sooner or later, but I suspect people
> > who know the code could do this much quicker and better than I.
> 
> The plan is to keep the original conffile in the dpkg database so
> we can do a more useful merge actually.

So this is already in the works? Great, what's the ETA? :) Please let me
know if I can be of any help. If nothing else, I'd love to test anything
in this direction.


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast



Acknowledgement sent to Wichert Akkerman <wichert@wiggy.net>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #26 received at 32877-quiet@bugs.debian.org (full text, mbox):

From: Wichert Akkerman <wichert@wiggy.net>
To: Michel D?nzer <daenzer@debian.org>
Cc: 32877-quiet@bugs.debian.org
Subject: Re: Bug#32877: Yet another slightly different suggestion :)
Date: Sun, 23 Dec 2001 18:56:44 +0100
Previously Michel D?nzer wrote:
> So this is already in the works? Great, what's the ETA? :) Please let me
> know if I can be of any help. If nothing else, I'd love to test anything
> in this direction.

Probably part of dpkg 1.10, which isn't soon I'm afraid. Too much
things we want to implement and verify and too little time.

conffile merging isn't all that difficult though so it'll probably
appear in CVS in the next month or so.

Wichert.

-- 
  _________________________________________________________________
 /wichert@wiggy.net         This space intentionally left occupied \
| wichert@deephackmode.org            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Development <debian-dpkg@lists.debian.org>, dpkg@packages.qa.debian.org:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to wscott@bitmover.com:
Extra info received and forwarded to list. Copy sent to Dpkg Development <debian-dpkg@lists.debian.org>, dpkg@packages.qa.debian.org. Full text and rfc822 format available.

Message #31 received at 32877@bugs.debian.org (full text, mbox):

From: "Wayne Scott" <wscott@bitmover.com>
To: "Debian Bug Tracking System" <32877@bugs.debian.org>
Subject: dpkg: Please!!
Date: Thu, 25 Jul 2002 13:50:23 -0500
Package: dpkg
Version: 1.10.4
Followup-For: Bug #32877

I agree emphathically!!

It would be great if you can merge changes in configfiles on update.
(just like 'cvs update')

And if dpkg doesn't currently save unmolested config files somewhere,
just create a copy of every config file in /var/lib/dpkg/config/<path>
when packages are installed.  (perhaps compressed)

The extra diskspace would be worth it.  Or make it optional.

-Wayne

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux desk.wscott1.homeip.net 2.4.19-pre9 #18 Wed May 29 10:19:16 EST 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages dpkg depends on:
ii  dselect                       1.10.4     a user tool to manage Debian packa
ii  libc6                         2.2.5-12   GNU C Library: Shared libraries an

-- no debconf information




Merged 32877 48717 120152 189805. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug title. Request was from Adam Heath <doogie@brainfood.com> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: patch Request was from Jarno Elonen <elonen@iki.fi> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336. Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336 268154. Request was from Scott James Remnant <scott@netsplit.com> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `wishlist'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `dpkg' to `dpkg'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336 268154 290854. Request was from Scott James Remnant <scott@netsplit.com> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336 268154 290854 294073. Request was from Scott James Remnant <scott@netsplit.com> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `dpkg' to `dpkg'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Scott James Remnant <scott@netsplit.com>:
Bug#32877; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to "Paul Smith" <psmith@nortel.com>:
Extra info received and forwarded to list. Copy sent to Scott James Remnant <scott@netsplit.com>. Full text and rfc822 format available.

Message #56 received at 32877@bugs.debian.org (full text, mbox):

From: "Paul Smith" <psmith@nortel.com>
To: 32877@bugs.debian.org
Subject: Still tops on my wish-list...
Date: Wed, 22 Jun 2005 08:11:45 -0400
Is there any forward progress on this feature?  I really, really would
love to have this.  Munging and merging conffiles is by far the most
painful part of any upgrade for me... and most of my changes are simple
enough that a 3-way merge would handle them trivially.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@nortel.com>           HASMAT: HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.



Merged 32877 48717 120152 189805 247336 268154 290854 294073 380332. Request was from "Adam D. Barratt" <debian-bts@adam-barratt.org.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Disconnected #380332 from all other report(s). Request was from "Adam D. Barratt" <debian-bts@adam-barratt.org.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336 268154 290854 294073 413436. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 32877 48717 120152 189805 247336 268154 290854 294073 413436 440640. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sun, 07 Oct 2007 18:51:16 GMT) Full text and rfc822 format available.

Forcibly Merged 32877 48717 120152 189805 247336 268154 290854 294073 413436 440640 473996. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sat, 12 Apr 2008 17:51:06 GMT) Full text and rfc822 format available.

Forcibly Merged 32877 48717 120152 189805 247336 268154 290854 294073 413436 440640 473996 548663. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 28 Sep 2009 06:33:08 GMT) Full text and rfc822 format available.

Forcibly Merged 32877 48717 120152 189805 247336 268154 290854 294073 413436 440640 473996 548663 578804. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Fri, 23 Apr 2010 05:12:08 GMT) Full text and rfc822 format available.

Removed tag(s) patch. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Thu, 06 May 2010 13:33:10 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#32877; Package dpkg. (Wed, 23 Mar 2011 10:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Vasily i. Redkin" <vir@ctm.ru>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 23 Mar 2011 10:06:03 GMT) Full text and rfc822 format available.

Message #77 received at 32877@bugs.debian.org (full text, mbox):

From: "Vasily i. Redkin" <vir@ctm.ru>
To: 32877@bugs.debian.org
Subject: Patch: add merge commands
Date: Wed, 23 Mar 2011 12:58:27 +0300
[Message part 1 (text/plain, inline)]
Attached patch (for dpkg-1.15.8.10) adds '--conf-merge-cmd' command line 
option, which adds user's favorite configuration files merging helper to 
the menu.

Usage example:

# dpkg --conf-merge-cmd='V;Diff/Merge versions with VIM;vim -d %O %N' 
install package.deb

or user can drop a file in /etc/dpkg/dpkg.cfg.d to permanently add 
his/her favorite merge tool:

# echo 'conf-merge-cmd V;Diff/Merge versions with VIM;vim -d %O %N' > 
/etc/dpkg/dpkg.cfg.d/50merge-vim



[dpkg-1.15.8.10-conf-merge-cmd.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Thu, 13 Sep 2012 12:51:06 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 07:11:18 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.