diskimage-builder/elements/pip-cache
Markos Chandras e22faa0f77 elements: Drop executable bits from environment files
Files in $element/environment.d are meant to be sourced, so drop
the executable bit. Moreover, drop the executable bit from a couple
of other scripts that are either meant to be sourced or simply because
they are configuration files.

Change-Id: I7f724dd9d409f4a835a136f12f48a84aa9acc41e
2016-12-01 23:06:56 +00:00
..
environment.d elements: Drop executable bits from environment files 2016-12-01 23:06:56 +00:00
root.d Standarise tracing for scripts 2015-02-12 10:41:32 +11:00
README.rst Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00

=========
pip-cache
=========
# Use a cache for pip

Using a download cache speeds up image builds.

Including this element in an image build causes
$HOME/.cache/image-create/pip to be bind mounted as /tmp/pip inside
the image build chroot.  The $PIP_DOWNLOAD_CACHE environment variable
is then defined as /tmp/pip, which causes pip to cache all downloads
to the defined location.

Note that pip and its use of $PIP_DOWNLOAD_CACHE is not concurrency
safe.  Running multiple instances of diskimage-builder concurrently
can cause issues.  Therefore, it is advised to only have one instance
of diskimage-builder that includes the pip-cache element running at a
time.

The pip concurrency issue is being tracked upstream at
https://github.com/pypa/pip/issues/1141