#include <hallo.h>
* Daniel Richard G. [Tue, Apr 04 2006, 12:57:40PM]:
> Same situation here as Tony's (Debian + Ubuntu), using path_map. My
> solution was to run two separate instances of apt-cacher, but having one 
> handle both would be preferable.
> 
> > Now I can change the code a bit to not remove the parent directories
> > when storing the files. However the next problem are people that
> > already have a working cache - the stored files would need to be moved 
> > to the "correct" locations but this is a bit complicated without 
> > knowing their origin.
> 
> Is it necessary to move the existing package files? Could not apt-cacher
> check for e.g. packages/debian_pool_main_f_foo_foo_1.1-1_i386.deb first,
> and packages/foo_1.1-1_i386.deb second? Keep up the expirations on the

Moving to directories carrying the download origin in the path, or
encoding the same information into the filename - that really does not
make a big difference. In contrary, And I can also imagine a worst case
where the encoded name can become really large, making filesystem
operation slower or even creating invalid filename (though I could not
find or imagine names longer than 150 chars, though).

> "path-less" package files, and this could allow for a painless migration 
> of users' repositories to the new convention, over time.

The problem is, the migration cannot be completely painless. Because
without tracking the origin of the packages apt-cacher will keep
delievering the wrong files, so it must to "learn" which mirrors or
download locations the existing files can be assigned to. Fortunately,
the transition won't be that complicated, because: the download origin
has been stored in .complete files since many months, IIRC Sarge
deep-freeze time. And even older downloads can be mapped to known
origin, using the index files (..._Packages encodes the path) and
checking the checksums of that files. I am also implemented an
"optimistic" mode which works without checksumming and makes the result
less reliable but is a lot faster.

Eduard.

-- 
Wer irgendeine von diesen Bemerkungen weder in seinem Leben noch die
Antizipation in seiner Seele hat: findet sie blo? leer oder nichts.
Etwas anderes ist, wenn einer eine falsch findet.
                -- Jean Paul

Reply via email to