ポートXがポートYに依存する理由を理解できますか?

ポートXがポートYに依存する理由を理解できますか?

FreeBSDで特定のポートをインストールしようとしたときに他のポートが依存関係としてリストされている理由を簡単に把握する方法はありますか?

特にVPSにWebalizerポートをインストールしようとしていますが、その過程でPythonをインストールしようとしています。私は直接使用しない新しいプログラミング言語をサーバーにインストールしたくありません。 Webalyzer(何かに依存する)+がPythonに依存していると思われますが、これらの依存関係の1つの構成設定を変更してこれを防ぐことができることを願っていますが、それを見つける方法がわかりません。

pkg_infoで同様の情報を見つけることができることを知っています。インストール済みポートがありますが、この情報を探したいです。今後インストールする。

ベストアンサー1

ポートシステムは、ランタイムとビルド時間の依存関係を表示する make ターゲットを提供します。ポートマニュアルページ

make pretty-print-run-depends-list pretty-print-build-depends-listしたがって、を使用して依存関係リストを取得できる必要があります。

run-depends-list, build-depends-list
                  Print a list of all the compile and run dependencies,
                  and dependencies of those dependencies, by port direc-
                  tory.

 all-depends-list
                  Print a list of all dependencies for the port.

 pretty-print-run-depends-list, pretty-print-build-depends-list
                  Print a list of all the compile and run dependencies,
                  and dependencies of those dependencies, by port name and
                  version.

 missing          Print a list of missing dependencies to be installed for
                  the port.

これらのターゲットを使用して、依存関係に従うシェルスクリプトを作成できます(これは愚かな高速ハッキングなので、おそらくより良い方法があります)。

#!/bin/sh

printdeps() {
  local ni
  local dep
  local thisdir

  dir=$1
  port=`basename $dir`
  i=$2
  ni="${i}${port}->"

  thisdir="$dir"
  cd "$dir"
  echo ${i}$dir
  for dep in `make build-depends-list` ; do
    printdeps $dep "$ni"
  done
  cd "$thisdir"
}

printdeps $PWD

Webalizerの場合、少なくともPythonのビルド依存関係パスを見つけることができます。webalizer->gd->tiff->freeglut->libGLU->libGL->/usr/ports/lang/python

おすすめ記事