On Tue 19 Apr 2022 at 07:24:53 (+0200), to...@tuxteam.de wrote: > On Mon, Apr 18, 2022 at 09:08:08PM -0400, Celejar wrote: > > On Fri, 15 Apr 2022 22:15:36 -0600 > > Charles Curley <charlescur...@charlescurley.com> wrote: > > > > ... > > > > > Apt-cacher-ng (hereafter acng) also requires a change in client apt > > > configurations. Put one line into apt.conf or a one-liner in > > > apt.conf.d. I use the latter, 02proxy: > > > > > > Acquire::http::Proxy "http://aptcacherdeb.localdomain:3142"; > > > > > > There are further wrinkles for laptops and other traveling computers, > > > and for https only repos, which I will leave as an exercise for the > > > student. > > > > Yes. I use apt-cacher-ng, but having to manually add a workaround for > > every SSL-only repository I use is getting rather annoying: > > That's true. Caching and HTTPS don't play well with each other. Why > a package repository has to be https-only is anyone's guess, but I > think apt caches should learn to do "man in the middle".
As for laptops, I iron out one wrinkle by not setting my proxy under /etc/apt/, but in the command lines instead. So the cron command has: apt-get -qq -o Acquire::http::Proxy="…" update && apt-get -qq -d -o Acquire::http::Proxy="…" dist-upgrade && find /var/cache/apt/archives/ -name '*deb' which generates an email whenever there are packages in the cache, and I upgrade the system with: apt-get -o Acquire::http::Proxy="…" update && apt-get -d -o Acquire::http::Proxy="…" dist-upgrade; apt-get upgrade; read -p 'Ctrl-C to avoid clean' _; apt-get clean (I avoid cleaning the cache when packages are held back so that an immediate apt-get dist-upgrade doesn't have to refetch them.) Apart from making it easy to run the root command when not at home (just rubout the -o option), this command line also works around apt-cacher-ng's occasional inability to cope with wrinkles such as expired certificates: when apt-listbugs runs during the upgrade, it avoids going through the cache. Cheers, David.