5

Intro: We have created a apt-cacher-ng server to provide cached packages to our users that have Ubuntu 14.04 installed. Combined with the cached packages, we are doing a weekly "mirror" of some Ubuntu update uris using the PrecacheFor parameter. The following regex will create mirror of all update repos:

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

However, it will make cache of debug packages, that are pretty bloated and it will not be useful. Sample html log output:

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...

Question: Is there a way exclude -dbg_ substring packages from being downloades using any option of apt-cacher-ng or using a uri regex ?

  • Sound like it's policy of ubuntu and apt. – PersianGulf Apr 21 '15 at 1:30
0

Try looking at the DontCache, DontCacheRequested, and DontCacheResolved directives. For example, something like:

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

The documentation says that this prevents files from being downloaded and cached, but it doesn't clarify the interactions between DontCache and PreCacheFor.

  • I´ll give it a try during my workhours. Thanks – user34720 Apr 20 '15 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy