Debian dpkgのデバッグ機能
Debianをいじくりすぎたせいで、特定のパッケージのインストールでエラーが発生するようになってしまった。
原因を追いかけたいが、エラー表示やログ(/var/log/dpkg.log)ではエラー箇所特定に必要な情報が集まらない。
マニュアルやコマンドヘルプを見ているとdpkg側にレベル別のデバッグオプションがあることがわかったのでメモ。
# dpkg -Dh dpkg debugging option, --debug=<octal> or -D<octal>: number ref. in source description 1 general Generally helpful progress information 2 scripts Invocation and status of maintainer scripts 10 eachfile Output for each file processed 100 eachfiledetail Lots of output for each file processed 20 conff Output for each configuration file 200 conffdetail Lots of output for each configuration file 40 depcon Dependencies and conflicts 400 depcondetail Lots of dependencies/conflicts output 1000 veryverbose Lots of drivel about eg the dpkg/info directory 2000 stupidlyverbose Insane amounts of drivel Debugging options are be mixed using bitwise-or. Note that the meanings and values are subject to change.
とりあえず、こんな感じで使い、エラー箇所を特定(今回は実行ファイルの不足)できたので処置を行い対応完了!
#dpkg -D2 -i hogehoge.deb