portsインストール後の注意書きを後で読むには

ports/packagesをインストールするといくつかのports/packagesで注意書き(Install Notice)が表示される。
たまーにクリティカルな注意の場合があるんだが、大量のports(packages)をインストールしているときなど、注意書きもターミナルの表示限界を超えて吹っ飛んでいく。

portmasterなどでインストールしていれば、こういった注意書きを後でまとめて表示してくれるが、後で気がついたところで時すでに遅し。


そこで考えた。
pkg_info -D <ports名>とするとインストール後のメッセージを表示してくれる。こいつにインストールしたports名のリストを与えてやればいいわけだ。

問題は依存も含めてどうやって一覧を作るかだが、pkg_info -r <ports名>でそのportsが依存するportsをリストしてくれる。
xorgを与えてあげると、以下のようになる。

$ pkg_info -r xorg-7.4_2
Information for xorg-7.4_2:

Depends on:
Dependency: xorg-docs-1.4,1
Dependency: xineramaproto-1.1.2
Dependency: xf86vidmodeproto-2.2.2
Dependency: xf86miscproto-0.9.2
Dependency: xf86dgaproto-2.0.3
Dependency: xextproto-7.0.5
Dependency: xbitmaps-1.0.1

あとはこれを整形してpkg_info -Dに渡せばよい。
もちろん、このリストがそのときにインストールされたportsのリストと一致するとは、必ずしも言えないんだが、そこはそれ。

$ pkg_info -r xorg-7.4_2|cut -f2 -d":"|xargs -n1 pkg_info -D|less
Information for xorg-docs-1.4,1:


Information for xineramaproto-1.1.2:


(中略)
Information for glib-2.20.4:


Information for gamin-0.1.10_3:

Install notice:
===============================================================================

Gamin will only provide realtime notification of changes for at most n
files,
where n is the minimum value between (kern.maxfiles * 0.7) and
(kern.maxfilesperproc - 200). Beyond that limit, files will be polled.

If you often open several large folders with Nautilus, you might want to
increase the kern.maxfiles tunable (you do not need to set
kern.maxfilesperproc, since it is computed at boot time from
kern.maxfiles).

For a typical desktop, add the following line to /boot/loader.conf, then
reboot the system:

   kern.maxfiles="25000"

(略)

ほとんどのportsには注意書きがないので、スペースバーを連打することになるが、まあ何度もあることじゃなし。
そのほか、/var/db/pkg配下ファイルの更新日時を使う手も考えたが、findコマンドを使うのが面倒なので止めた。