Handbook:Parts/Portage/Tools/zh-cn

dispatch-conf
是一个帮助合并 的工具. 是由Portage在它要覆盖被CONFIG_PROTECT变量所保护的某个目录里的文件时建立的.

使用 ,能够在合并配置文件并升级更新的同时保持所有更新记录. 以RCS版本管理系统或是补丁的方式来保存配置文件间的差别. 这意味着如果你在升级配置文件犯下错误时，你可以随时退回到你的配置文件的之前版本.

使用 ,，你可以保持配置文件原来的样子，或者使用新的配置文件，你还可以编辑当前文件或交互式地合并更新. 除此之外， ,还有一些很棒的特性：


 * Automatically merge configuration file updates that only contain updates to comments
 * Automatically merge configuration files which only differ in the amount of whitespace

Edit first and create the directory referenced by the archive-dir variable. Then, execute :

When running, each changed config file will be reviewed one at a time. Press to update (replace) the current config file with the new one and continue to the next file. Press to zap (delete) the new config file and continue to the next file. Once all config files have been taken care of, will exit. At any time, can be used to exit the application as well.

For more information, check out the dispatch-conf man page. It describes how to interactively merge current and new config files, edit new config files, examine differences between files, and more.

etc-update
Another tool to merge configuration files is. It is not as simple to use as, nor as fully featured, but it does provide an interactive merging setup and can also auto-merge trivial changes.

However, unlike, does not preserve the old versions of the config files. Once a file is updated, the old version is gone forever. Be very careful, as using is significantly less safe than using  when desiring to keep old configuration files.

After merging the straightforward changes, a list of protected files will be provided that have an update waiting. At the bottom the possible options are shown:

When entering,  will exit and discontinue any other changes. With  or , all listed configuration files will be overwritten with the newer versions. It is therefore very important to first select the configuration files that should not be automatically updated. This is simply a matter of entering the number listed to the left of that configuration file.

As an example, we select the configuration file :

The differences between the two files are shown. If the updated configuration file can be used without problems, enter. If the updated configuration file isn't necessary, or doesn't provide any new or useful information, enter. If the current configuration file has to be interactively updated, enter.

There is no point in further elaborating the interactive merging here. For completeness sake, we will list the possible commands that can be used while interactively merging the two files. Users 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:

After having finished updating the important configuration files, users can then automatically update all the other configuration files. will exit if it doesn't find any more updateable configuration files.

quickpkg
With users can create archives of the packages that are already merged on the system. These archives can be used as prebuilt packages. Running is straightforward: just add the names of the packages to archive.

For instance, to archive curl, orage, and procps:

The prebuilt packages will be stored in $PKGDIR ( by default). These packages are placed in.