Aptitude::CmdLine::Show-Deps (-D) vs. Aptitude::CmdLine::Show-Why (-W)

Eee PC 900A への Debian Sid のインストール (まだ途中だけど) でひさしぶりに aptitude の設定ファイルを編集して、そのときは単純にメイン・マシンと同じにしたのだけど、それをきっかけに aptitude-doc-en の "Configuration file reference" (/usr/share/doc/aptitude/html/en/ch02s04s05.html) を見直してみた。
で、自動的にインストールされるパッケージについて、その理由 (依存関係) を表示するっていうオプションがあるのに気づいて、それはいいかもしれない、試してみようと思ったのだけど、なんか似たようなのがふたつある。Aptitude::CmdLine::Show-Deps (コマンドライン・オプションだと -D) と Aptitude::CmdLine::Show-Why (-W)。
ちょっとだけ調べてみた。
新しいパッケージをインストールする場合の比較。まず、sudo aptitude -s -D install gthumb の出力で関係する部分 (うちは gthumb 入ってない)。

以下の新規パッケージがインストールされます:
  gthumb  gthumb-data{a} (依: gthumb)  libopenraw1{a} (依: libopenrawgnome1)  libopenrawgnome1{a} (依: gthumb)

つづいて、sudo aptitude -s -W install gthumb の出力で関係する部分。

以下の新規パッケージがインストールされます:
  gthumb  gthumb-data{a} (理由: gthumb)  libopenraw1{a} (理由: gthumb)  libopenrawgnome1{a} (理由: gthumb)

libopenraw1 の依存関係の出力のしかたがちがうけど、まあどっちでもいいかなという感じ。
しかし、アップグレードでの出力は大きくちがうのだった。まず、数日ぶりに行う sudo aptitude -s -D full-upgrade の出力で関係する部分。

以下の新規パッケージがインストールされます:
  libdatrie1{a} (依: libthai0)  libtdb1{a} (依: libcanberra-gtk0, 依: libcanberra0)  libxcb-atom1{a} (依: libstartup-notification0)  
  libxcb-aux0{a} (依: libstartup-notification0)  libxcb-event1{a} (依: libstartup-notification0)  python-gdl{a} (依: python-gnome2-extras)  
  python-gksu2{a} (依: python-gnome2-extras)  
以下のパッケージが削除されます:
  libltdl3{pu} (依: guile-1.8-libs, 依: libcanberra0)  
以下のパッケージが更新されます:
  console-setup  empathy  ffmpeg  guile-1.8-libs  gvfs  gvfs-backends  gvfs-bin  kernel-package  libavcodec52  libavdevice52  libavfilter0  libavformat52  
  libavutil50  libcanberra-gtk0  libcanberra0  libempathy-common  libempathy-gtk-common  libempathy-gtk19  libempathy23  libgvfscommon0  libilmbase6  
  libpostproc51  libraptor1  libstartup-notification0  libswscale0  libthai-data  libthai0  libx264-67  libxfont1  python-apt  python-eggtrayicon  
  python-gnome2-extras  python-gtkhtml2  python-gtkmozembed  python-gtkspell  seahorse-plugins  tex-common  whois  
以下のパッケージが推奨されていますがインストールされません:
  libcanberra-gtk-module (推: libcanberra-gtk0, 提: gnome-control-center)  obex-data-server (推: gvfs-backends)  
  openssh-client (推: seahorse, 推: seahorse-plugins, 提: apt-file)  raptor-utils (推: libraptor1)  telepathy-gabble (推: empathy)  
  telepathy-salut (推: empathy)

つづいて、sudo aptitude -s -W full-upgrade の出力で関係する部分。

以下の新規パッケージがインストールされます:
  libdatrie1{a}  libtdb1{a}  libxcb-atom1{a}  libxcb-aux0{a}  libxcb-event1{a}  python-gdl{a}  python-gksu2{a}  
以下のパッケージが削除されます:
  libltdl3{pu}  
以下のパッケージが更新されます:
  console-setup  empathy  ffmpeg  guile-1.8-libs  gvfs  gvfs-backends  gvfs-bin  kernel-package  libavcodec52 (理由: ffmpeg)  
  libavdevice52 (理由: ffmpeg)  libavfilter0 (理由: ffmpeg)  libavformat52 (理由: ffmpeg)  libavutil50 (理由: ffmpeg)  libcanberra-gtk0  
  libcanberra0  libempathy-common  libempathy-gtk-common  libempathy-gtk19  libempathy23  libgvfscommon0  libilmbase6  libpostproc51 (理由: ffmpeg)  
  libraptor1  libstartup-notification0  libswscale0 (理由: ffmpeg)  libthai-data  libthai0  libx264-67 (理由: ffmpeg)  libxfont1  python-apt  
  python-eggtrayicon  python-gnome2-extras  python-gtkhtml2  python-gtkmozembed  python-gtkspell  seahorse-plugins  tex-common  whois  
以下のパッケージが推奨されていますがインストールされません:
  libcanberra-gtk-module  obex-data-server  openssh-client  raptor-utils  telepathy-gabble  telepathy-salut

Aptitude::CmdLine::Show-Why は、自動でインストールされるパッケージについて、それが手動でインストールされる (あるいはされた) どのパッケージに依存してのものかを表示するということだけど、依存関係が多段になっていると途中でさかのぼるのをやめてしまうということだろうか。
なんにせよ、一番肝心なところで役に立ってくれないので、Aptitude::CmdLine::Show-Why は設定せず、Aptitude::CmdLine::Show-Deps を設定することにした (両方設定すると冗長になりすぎるので片方を選ばざるをえない)。もうひとつ、Aptitude::CmdLine::Show-Versions (コマンドライン・オプションだと -V) も設定しようかと思ったのだけど、これまた冗長になりすぎるのでやめておいた。

// /etc/apt/apt.conf.d/99local

// file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#configAptInstall-Recommends
// http://lwn.net/Articles/243939/
Apt::Install-Recommends "false";

// file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#configCmdLine-Show-Deps
Aptitude::CmdLine::Show-Deps "true";

// file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#configCmdLine-Show-Versions
//Aptitude::CmdLine::Show-Versions "true";

// file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#configCmdLine-Show-Why
//Aptitude::CmdLine::Show-Why "true";

// file:///usr/share/doc/aptitude/html/en/ch02s04s05.html#configPurge-Unused
Aptitude::Purge-Unused "true";