Provided by: dpkg_1.19.0.5ubuntu2.4_amd64 bug

名前

       dpkg-divert - パッケージの提供するファイルの上書き

書式

       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.

コマンド

       [--add] file
              file を退避ファイルに追加する。

       --remove file
              file を退避ファイルから削除する。

       --list glob-pattern
              glob-pattern にマッチする退避ファイルの一覧を表示する。

       --listpackage file
              Print  the  name  of  the  package that diverts file (since dpkg 1.15.0).  Prints LOCAL if file is
              locally diverted and nothing if file is not diverted.

       --truename file
              退避されたファイルの実際のファイル名を表示する。

オプション

       --admindir directory
              Set the dpkg data directory to directory (default: /var/lib/dpkg).

       --divert divert-to
              divert-to は、他のパッケージによって提供された file の退避場所である。

       --local
              パッケージが提供する該当ファイルについてはすべて退避の対象とする。これは、いかなるパッケージがイン
              ストールされても、該当のファイルは退避されることを意味する。これにより、管理者が修正したファイルを
              ローカルにインストールすることが可能となる。

       --package package
              package は、file の退避が発生しないパッケージ名である。つまり、package  以外のすべてのパッケージの
              提供する file は、退避される。

       --quiet
              非表示モード。冗長な出力をしない。

       --rename
              実際にファイルを退避 (もしくは復帰) させる。dpkg-divert は、退避 (復帰) 先のファイルが既に存在して
              いると動作を中断する。

       --test テストモード。実際にはなにも実行せず、なにを実行するかを表示するだけである。

       -?, --help
              利用方法を表示して終了する。

       --version
              バージョン情報を表示して終了する。

終了ステータス

       0      指定したアクションが正しく実行された。

       2      Fatal  or  unrecoverable error due to invalid command-line usage, or interactions with the system,
              such as accesses to the database, memory allocations, etc.

環境変数

       DPKG_ADMINDIR
              If set and the --admindir option has not been  specified,  it  will  be  used  as  the  dpkg  data
              directory.

       DPKG_MAINTSCRIPT_PACKAGE
              --local  および  --package オプションが設定されておらず、この変数が設定されている場合、dpkg-divert
              は、この変数の値をパッケージ名として使用する。

ファイル

       /var/lib/dpkg/diversions
              File which contains the current list of diversions of the  system.  It  is  located  in  the  dpkg
              administration directory, along with other files important to dpkg, such as status or available.
              注記: dpkg-divert は、このファイルを更新する時に古いバージョンを -old という拡張子をつけたファイル
              にコピーして保存する。

参考

       ファイルを追加する時のデフォルトは、--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

関連項目

       dpkg(1).

翻訳者

       高橋 基信 <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>.

1.19.0.5                                           2022-05-25                                     dpkg-divert(1)