apt-cacher-ng サーバーで -dbg_version パッケージを使用しないでください。

apt-cacher-ng サーバーで -dbg_version パッケージを使用しないでください。

紹介する:apt-cacher-ngUbuntu 14.04がインストールされているユーザーにキャッシュされたパッケージを提供するためのサーバーを作成しました。キャッシュされたパッケージと一緒にこのパラメータをPrecacheFor使用して、毎週いくつかのUbuntuアップデートURIを「ミラーリング」します。次の正規表現は、すべての更新リポジトリのミラーを生成します。

PrecacheFor: uburep/dists/trusty-updates/*/binary-amd64/Packages*

しかし、非常に肥大で有用ではないデバッグパッケージをキャッシュします。サンプルHTMLログ出力:

Downloading uburep/pool/main/c/ceph/librbd1-dbg_0.80.5-0ubuntu0.14.04.1_amd64.deb...
<i>(6234KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-base_4.2.6.3-0ubuntu1_amd64.deb...
<i>(1380KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-base-core_4.2.6.3-0ubuntu1_amd64.deb...
<i>(715KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-base-drivers_4.2.6.3-0ubuntu1_amd64.deb...
<i>(515KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-calc_4.2.6.3-0ubuntu1_amd64.deb...
<i>(5779KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-common_4.2.6.3-0ubuntu1_all.deb...
<i>(19345KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-core_4.2.6.3-0ubuntu1_amd64.deb...
<i>(27243KiB)</i>

Downloading uburep/pool/main/libr/libreoffice/libreoffice-dbg_4.2.6.3-0ubuntu1_amd64.deb...

質問:uri regexオプションを使用するか、uri regexを使用してサブストリング-dbg_パッケージをダウンロードから除外する方法はありますか?apt-cacher-ng

ベストアンサー1

DontCacheと指示DontCacheRequestedを確認してくださいDontCacheResolved。たとえば、次のようになります。

DontCache (^|.*?/).+?-dbg_[0-9]

ドキュメントには、これはファイルがダウンロードされキャッシュされるのを防ぐことができることを示してDontCacheいますがPreCacheFor

おすすめ記事