简介:我们创建了一个apt-cacher-ng
服务器来为安装了 Ubuntu 14.04 的用户提供缓存包。结合缓存的包,我们正在使用该PrecacheFor
参数对某些 Ubuntu 更新 uri 进行每周“镜像” 。以下正则表达式将创建所有更新存储库的镜像:
PrecacheFor: uburep/dists/trusty-updates/*/binary-amd64/Packages*
Run Code Online (Sandbox Code Playgroud)
但是,它会缓存调试包,这些包非常臃肿并且没有用。示例 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...
Run Code Online (Sandbox Code Playgroud)
问题:有没有办法使用 uri regex 的-dbg_
任何选项apt-cacher-ng
或使用 uri regex将子字符串包从下载中排除?
尝试查看DontCache
、DontCacheRequested
和DontCacheResolved
指令。例如,类似:
DontCache (^|.*?/).+?-dbg_[0-9]
Run Code Online (Sandbox Code Playgroud)
文档说这会阻止文件被下载和缓存,但它没有阐明DontCache
和之间的交互PreCacheFor
。
归档时间: |
|
查看次数: |
303 次 |
最近记录: |