|Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc|
etc-update is a tool to help merging changes made in config files during updates. You may also want to have a look at dispatch-conf, which also creates backups of your config files automatically.
- Run the command etc-update
- You'll see a list of changed config files. For each file, you can:
- Merge the update
- Discard the update
- Partially (interactively) merge the update
- Ignore the update
If you want to see the differences in the files, before you make a selection, just press [Enter]. Quit the diff mode you have entered by pressing "q".This will bring you back to the selection.
Merging changes interactively
- ed: Edit then use both versions, each decorated with a header.
- eb: Edit then use both versions.
- el: Edit then use the left version.
- er: Edit then use the right version.
- e: Edit a new version.
- l: Use the left version.
- r: Use the right version.
- s: Silently include common lines.
- v: Verbosely include common lines.
- q: Quit.
The configuration file of etc-update is /etc/etc-update.conf
When eu_automerge is yes, changes in comments or CVS headers will be merged automatically.
You can specify parameters passed to cp, mv and rm. Example:
rm_opts="-i" mv_opts="-i" cp_opts="-i"
You can choose command used to print differrences between files. Filenames are passed as %file1 and %file2. Example for diff:
diff_command="diff -uN %file1 %file2" using_editor=0
Example for vimdiff:
diff_command="vim -d %file1 %file2" using_editor=1
You probably don't want to change it. It specifies command used to actually merge the changes. Default is
merge_command="sdiff -s -o %merged %orig %new"
Passed parameters are %orig, %new and %merged.
There is a note in the configuration file saying that vimdiff cannot be used to merge, but that is not right. The following makes a vimdiff with the left buffer as the merged file, which starts out as the original, and the right buffer as the new file. Simply save and quit, then you can choose either file as the one to use. Change the script filename as you see fit.
merge_command="vimdiff %merged %orig %new -S /usr/local/bin/etc-update.vim"
wincmd l normal ggVGy quit wincmd h normal pggdd diffupdate
When you would like to have some color ouput to your etc-update I suggest you use colordiff. It's a small program that gives something extra to your diff needs. It's very easy to install and to set up:
# emerge colordiff
diff_command="colordiff -uN %file1 %file2"
You may also need to change less to accept raw input if you are using it as your pager.
General tips on how to use etc-update
If you use etc-update for the first time, you'll probably don't know which config files you should overwrite or keep. In general, you should follow these simple rules:
- Always overwrite files in /etc/init.d/ with their new version. This ensures every daemon will start up correctly.
- In almost all cases, it is advisable to overwrite any config file you never edited by yourself. Most users won't change anything in /etc/udev/ or /etc/pam.d/ or many other config files which don't need any changes (except on very "special" systems).
- Look at every file you changed manually. In most cases, etc-update wants to replace them with their original copy. This is surely not what you want, and in 99% of all cases you'll want to keep your own config.
- If you're unsure about what to do with a specific configuration file, look at the changes. If this doesn't help, ask a friend or in the Gentoo forums, and ignore the update for this time.
Concerns or Compliments? Please use the Discussion section.
- TIP dispatch-conf - A more functional alternative with support for (incremental) backups.
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.