Additional functionality of Portage
Updated 22 Août 2019
etc-update is a tool for updating system files. It provides interactive setup and can also validate trivial changes automatically.
When you need to replace a file in a directory protected by , Portage creates files.
etc-update is quite simple.
After completing trivial updates, you will be prompted with a list of protected files waiting to be updated. You will have the choice between:
Please select a file to edit by entering the corresponding number. (-1 to exit) (-3 to auto merge all remaining files) (-5 to auto-merge AND not use 'mv -i'):
When you press ,
etc-update exits, stopping subsequent changes. If you press or , all listed configuration files will be replaced with newer versions. Therefore, it is important to first select files that should not be updated automatically. To do this, you only need to enter the number on the left of the file name.
For instance, let us look at
Beginning of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf ... End of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf 1) Replace original with update 2) Delete update, keeping original as is 3) Interactively merge original with update 4) Show differences again
Now you can see the differences between the two files. If you are sure that the updated configuration file can be used with no problem, enter . If you think that the updated version of the configuration file is unnecessary or does not contain new or useful information, then enter . If you prefer interactive update, enter .
There is no point in describing the interactive update in detail. For completeness sake, we will list the possible commands that can be used while interactively merging the two files. You are greeted with two lines (the original one, and the proposed new one) and a prompt at which the user can enter one of the following commands:
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.
After having finished updating the important configuration files, you can then automatically update all the other configuration files.
etc-update will exit if it doesn't find any more updateable configuration files.
dispatch-conf you can update your configuration files while retaining the history of your updates.
dispatch-conf stores the differences between configuration files as patches or as RCS versions.
etc-update, you can choose either to save the configuration file as is, to use the new configuration file, to edit the current one, or merge changes interactively. However,
dispatch-conf has some nice bonus features:
- auto update of files in which only comments were modified
- auto update of files that differ only in the number of spaces
Make sure you edit beforehand and create the directory specified in .
To learn more, refer to the
dispatch-conf man page:
quickpkg you can create archives of already installed packages. They can be used as binaries.
quickpkg has simple syntax: just specify the names of the packages you want to be archived.
For instance, to archive
quickpkg curl arts procps
Binary packages will be stored in (at for 64 bit systems by default). The symlinks that point to these packages will be put in .