Can I just copy some .debs into the cache dir and have it work (precaching)?
Yes! However a bit additional work is required to make them useable and persistent in the cache. First: alongside with the debs apt−cacher stores additional information: a flag file to verify that the package is completely downloaded, and a file with HTTP headers that have been sent from the server. If you copy .debs straight into the storage directory and don’t add those things, fetching them *will* fail. Fortunately Apt−cacher now comes with an import helper script to make things easier. Just put a bunch of .debs into /var/cache/apt−cacher/import (or a directory called ’import’ inside whatever you’ve set your cache dir to be), and run /usr/share/apt−cacher/apt−cacher−import.pl (you can specify alternative source directory with the first parameter). The script will run through all the package files it finds in that dir and move them around to the correct locations plus create additional flag/header files. Run it with “−h” to get more information about how to use additional features –
Related Questions
- If I copy more data from an external disk drive than there is remaining space on my C: drive, how does Livedrive cache the files locally?
- Is it possible to copy hard drives of different specifications (rpm, cache memory size, manufacturer, access time)?
- Why do I get the error, "can create package cache dir, /cachedir/packages\"?