On 3/8/08, Mateusz Poszwa <[EMAIL PROTECTED]> wrote:
> Or maybe even better it would be if apt used DebTorrent's cache.
> It can be easily achieved by merging both caches
> if they are on the same slice (usually they are).
> If debtorrent is the only method of obtaining packages
> #apt-get clean
> #ln /var/cache/debtorrent/*/pool/*/*/*/*.deb /var/cache/apt/archives
Thanks for the suggestion, that seems to work very well. :)
If you wanted to automate this setup, you could try adding the
following to your apt.conf file:
DPkg::Post-Invoke { "apt-get clean && ln
/var/cache/debtorrent/*/pool/*/*/*/*.deb /var/cache/apt/archives"; };
This would clean out ALL packages files though, and replace them with
only the ones downloaded by DebTorrent, so if you have 'deb' lines in
your sources.list file that aren't pointing to DebTorrent you may want
to think twice before doing this.
> should be safe unless package files are written to (I think they're not).
Once they're downloaded they aren't written again, so as long as
DebTorrent isn't downloading anything, running this should be fine.
> In case the caches are on different slices ln throws error messages,
> so there is ability to catch them and fall back.
I guess this adds another possible solution to this bug, in addition
to the one I already mentioned, so I'll have to decide which one is
better. Probably this method is better, especially if I make a script
that removes and links only the files in apt's cache that debtorrent
has available.
Thanks,
Cameron
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]