名前
- Provided by: dpkg (Version: 1.18.4ubuntu1.7)
- Report a bug
dpkg-divert [option...] command
dpkg-divert は、退避ファイルの一覧を設定、更新するためのユーティリティである。
File diversions are a way of forcing dpkg(1) not to install a file into its location, but to a diverted location. Diversions can be used through the Debian package scripts to move a file away when it causes a conflict. System administrators can also use it to override some package's configuration file, or whenever some files (which aren't marked as “conffiles”) need to be preserved by dpkg, when installing a newer version of a package which contains those files.
ファイルを追加する時のデフォルトは、--local および --divert original.distrib である。削除する時に、--package もしくは --local と --divert が指定されていた場合は、これらの整合性がとれている必要がある。
dpkg-divert でディレクトリを退避させることはできない。
Care should be taken when diverting shared libraries, ldconfig(8) creates a symbolic link based on the DT_SONAME field embedded in the library. Because ldconfig doesn't honour diverts (only dpkg does), the symlink may end up pointing at the diverted library, if a diverted library has the same SONAME as the undiverted one.
/usr/bin/example となるファイルすべてを /usr/bin/example.foo に退避させる、つまり、/usr/bin/example を提供するすべてのパッケージが、該当ファイルを /usr/bin/example.foo にリネームしてインストールするようにさせる:
dpkg-divert --divert /usr/bin/example.foo --rename /usr/bin/example
該当の退避ファイルを削除する。
dpkg-divert --rename --remove /usr/bin/example
/usr/bin/example をインストールしようとするすべてのパッケージを /usr/bin/example.foo に退避させる。ただし、自作の wibble パッケージを除く:
dpkg-divert --package wibble --divert /usr/bin/example.foo --rename /usr/bin/example
該当の退避ファイルを削除する。
dpkg-divert --package wibble --rename --remove /usr/bin/example
高橋 基信 <monyo@monyo.com>. 喜瀬 浩 <kise@fuyuneko.jp>. 関戸 幸一 <sekido@mbox.kyoto-inet.or.jp>. 鍋谷 栄展 <nabe@debian.or.jp>. 倉澤 望 <nabetaro@debian.or.jp>. 石川 睦 <ishikawa@linux.or.jp>. 鵜飼 文敏 <ukai@debian.or.jp>. 中野 武雄 <nakano@apm.seikei.ac.jp>.
Debian JP Documentation ML <debian-doc@debian.or.jp>.