[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic partial archive mirroring



Celejar <celejar@gmail.com> writes:

>Cameron Hutchison <lists@xdna.net> wrote:

>> >and then have the gateway box get those packages.  
>> 
>> hmmm. How? Is there an existing tool that will do this? Doing it
>> manually (in a script) would require too much work (essentially
>> implementing apt-get -d dist-upgrade against a specified package index
>> and package list).

>How about using 'aptitude download', possibly feeding the package list
>to aptitude with xargs?  The 'download' action downloads to the current
>directory, so I suppose that you'd use a temp directory, and that would
>have the side effect of getting a copy stored by the cacher.

The problem is the the dpkg architecture (and distribution) of the host
is different to the targets.  'aptitude download' is going to use the
native dpkg architecture, and is going to look in /etc/apt/sources.list
for the sources to use.

It looks like it may be possible to use something like 'aptitude
extract-cache-subset' on the targets and set Apt::Architecture to the
target on the command line. apt.conf(5) has a number of details of how I
can override most of the host environment.

Hmmm, I can see how this might work now.

* periodically run aptitude extract-cache-subset on the targets and
  send that to the host
* every night on the host, run 'aptitude -d dist-upgrade', but
  overriding all the directories for configs, indexes, pkgstates, etc and
  architecture to point to what has been captured by extract-cache-subset.
  Also point aptitude to the local apt-cacher-ng proxy so all downloads
  go through it.
* delete the downloaded files, since apt-cacher-ng has already cached
  them.

Thanks for the ideas. Perhaps I can knock this up fairly easily. I'll
certainly learn more about apt than I probably want to :-)



Reply to: