Moin Jonathan! Eduard Bloch schrieb am Mittwoch, den 20. April 2005: > - online mode: the index files (packages, sources, ...) are fetched > by-demand, every time someone tries to access them, using the > timestamping feature of wget (basically forwarding the same thing
PS: I just played around with wget and its timestamp handling really sucks. However, curl is a much better replacement. With curl, you can do the following thing: curl -D headers.randomnumber -z cached-package-file URL -o tmp/new-packages-files if curl exited with no error and no new file was created, send contents of the old file to the client if an error occured, return http error but keep the old copy if a new file has been created, make a backup of the cached file (*), lock the cached file, replace the contents with those from headers.randomnumber (**) and new-packages-file, set the same file modification date, then unlock it. (etc.pp., the code is already there and just needs to be rewritten for the different way of operation with curl). (*): one can easily integrate a less invasive (see #305175) pre-caching method at this point, by extracting the list of packages that are potentially requrested by the old packages.gz file and that are available in a new version. It would still has the trend to cache more than neccessary but not that bad. (**): this is also a good point to rewrite the things a bit in order to keep the package data and headers separated on the hard disk (a feature that people requested before, IIRC). I mean: create the subdirs: $cachedir/data/* (where *.deb are real packages) $cachedir/headers/* (where *.deb.head are http headers) and if the "new" apt-cacher does $cachedir/foo.deb (the old format), it looks for $cacherdir/headers/foo.deb.head and $cachedir/data/foo.deb and returns the that headers and then the package contents. Over time, people would migrate to this new format. Or even better, a small perl script could separate the current ".deb" files into the new files (because the current files are not real debs, they contain headers). Regards, Eduard. -- <BigAcE^23> ja dann gib mal bitte ne addy <jjFux> Eine die kewl funzen tut? <BigAcE^23> jupp -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]