Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 333921

Summary: use diff3 for etc-update
Product: Gentoo Linux Reporter: Łukasz Stelmach <stlman>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: nikoli
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Łukasz Stelmach 2010-08-22 09:13:20 UTC
There is a way to speed up merging of configuration files with etc-update. It requires additional disk space to keep original unchanged files (eg. /var/lib/portage/config-files). When you have:

1. the original file in /var/lib/portage/config-files
2. customised "working copy" in /etc
3. .cfg_* in /etc

you can use "diff3 [2] [1] [3]" to find differences and merge them. If the file in /etc is the same as in /var/lib/portage/config-files that means it can be replaced without loosing any customizations. This is often the case with /etc/init.d/* and /usr/share/X11/xkb/*.

It should, however, be still possible to do etc-update the old fashioned way to see the exact differences between the old and new or at least, see which files can be merged with diff3 without user making decisions.

Reproducible: Always

Steps to Reproduce:
Comment 1 Zac Medico gentoo-dev 2010-08-25 22:48:19 UTC
It think dispatch-conf already does what you want (like etc-update, it's included with portage). I'm not sure if it's worth the effort to add this functionality to etc-update.
Comment 2 Łukasz Stelmach 2010-08-28 19:27:56 UTC
(In reply to comment #1)
> It think dispatch-conf already does what you want (like etc-update, it's
> included with portage). I'm not sure if it's worth the effort to add this
> functionality to etc-update.

I haven't known this one, nice tool. I'll try it next time I'll emerge -uDNavt world.

I think implementing something lighter (i.e. "/var/lib/portage/config-files) in etc-update could help. For example not so long ago I had to "merge" several dozens of xkb keymaps which I haven't seen before. With "diff3-way" it would be obvious I haven't touched them. I'm not sure though I need to keep a history of my all config files (including xkb maps) on my desktop computer.
Comment 3 SpanKY gentoo-dev 2012-03-11 02:49:00 UTC
i tend to agree with Zac.  if dispatch-conf does what you need, then let's just go that route.