git and tarball caching of packages
We currently store our downloaded sources in cookbook/recipes/*/source, but after an unfetch they need to be re-downloaded; potentially straining network hosts.
Some other build systems get around this by caching their downloaded files; yocto and buildroot for example. Buildroot caches git directories.
I suggest cookbook does something similar:
- set up a downloads directory
- when we download a tarball or a clone a git repo, re-tar it stamped with a version to the downloads directory
- when "source" is missing, look first in the downloads directory if we have a matching version and use that.
We don't have a ton of targets, so there is currently little reason to distclean regularly, but as the number of targets and contributors increase we could start stressing third party repositories.
Edited by Jordan McCallum