dpkgの設定ファイルプロンプトのdiffオプションの指定

dpkgの設定ファイルプロンプトのdiffオプションの指定

構成ファイルが変更されると、dpkg実行する操作を求めるメッセージが表示されます。

Configuration file '/etc/apache2/mods-available/ssl.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** ssl.conf (Y/I/N/O/D/Z) [default=N] ? 

を選択すると、現在の新しいプロファイルで実行されますDdiff -Nu

他のオプションをどのように指定しますかdiff特に、私はしばしば-b

ベストアンサー1

できないようです。 diffオプションはdpkgソースコードにハードコードされています。 ~からsrc/configure.c:

            /* Child process. */
            char cmdbuf[1024];

            sprintf(cmdbuf, DIFF " -Nu %.250s %.250s | %.250s",
                    str_quote_meta(old), str_quote_meta(new),
                    command_get_pager());

            command_shell(cmdbuf, _("conffile difference visualizer"));

DIFFマクロですlib/dpkg/dpkg.hそしてとして定義されました"diff"。だからこれはdiff -Nuハードコーディングされました。

これはおそらくDebian のバグ #380332

おすすめ記事