diskimage-builder/elements
Tim Serong 43c0082aa7 Move /tmp/ccache setup to base element
Commit c7d80dd (Cleanup mount points automatically) removed the unmount
of $TMP_MOUNT_PATH/tmp/ccache in run_d_in_target() and moved the
"rm /tmp/ccache" to elements/base/finalise.d/02-remove-ccache.  There
are two problems with this:

1) Not unmounting at the end of run_d_in_target() results in tmp/ccache
   being bind mounted muliple times on top of itself (three times, if you
   just run `disk-image-create base`).  It is eventually unmounted, but
   somehow the auto unmount code is confused, and tries to unmount it
   one more time than it was mounted, which results in an error like
   "umount: /tmp/image.THQkZxQa/mnt/tmp/ccache: not mounted".
   This doesn't actually break anything, but it's a little messy.

2) "rm /tmp/ccache" in elements/base/finalise.d/02-remove-ccache never
   succeeds in removing /tmp/ccache, because that hook is invoked by
   run_d_in_target(), *while* /tmp/ccache is mounted.

This present commit solves the above by moving the ccache setup glue out
of img-functions and into the base element's root.d.  This has the
following implications:

1) lib/img-functions is a little cleaner.

2) /tmp/ccache is available in the chroot during the root, extra-data,
   pre-install, install and post-install stages.  It is not available
   during block-device, finalise and cleanup stages as it will have been
   automatically unmounted by then.

3) /tmp/ccache won't be setup if you're building an image that doesn't
   include the base element.

Change-Id: Ief4c0a6f4ec622db6c6f652776215684178d8943
2013-10-10 16:27:09 +11:00
..
base Move /tmp/ccache setup to base element 2013-10-10 16:27:09 +11:00
cache-url Ignore empty files returned by curl 2013-10-04 09:26:43 +01:00
cloud-init-nocloud Make cloud-init-nocloud work cross-platform. 2013-07-11 08:21:51 -07:00
config-applier Remove github references 2013-09-18 08:17:10 -05:00
deploy Add needed symlink for Fedora deployment ramdisk. 2013-07-26 11:09:29 -04:00
deploy-kexec Add deploy-kexec element 2013-09-17 14:01:20 -07:00
dhcp-all-interfaces Generate interfaces file before cloud-init runs 2013-10-03 16:00:19 -07:00
dib-run-parts Set locale for the profiling printf command 2013-09-30 12:10:07 +02:00
disable-selinux/post-install.d Add disable-selinux element. 2013-06-14 09:39:07 +01:00
dkms dkms is unavailable on RHEL and derivatives 2013-08-12 19:07:28 -07:00
dpkg Merge "Adds support for post-install scripts." 2013-04-22 22:18:25 +00:00
dracut-network Install patch for dracut patching 2013-08-29 15:10:11 +12:00
fedora Use --numeric-owner when extracting base image 2013-10-08 22:45:51 +11:00
hwburnin Build ramdisks in an image chroot. 2013-07-12 11:09:35 +01:00
hwdiscovery Set file permission to be executable. 2013-08-20 08:44:43 +00:00
local-config Set correct mode for .ssh/authorized_keys files. 2013-05-24 12:01:57 +12:00
mellanox Fix mellanox module loading. 2013-10-04 09:53:03 +01:00
pip-cache Add a pip-cache element. 2013-08-26 15:17:41 -04:00
pypi Remove github references 2013-09-18 08:17:10 -05:00
ramdisk Build ramdisks in an image chroot. 2013-07-12 11:09:35 +01:00
rhel Merge "Use --numeric-owner when extracting base image" 2013-10-08 22:54:08 +00:00
rpm-distro Extracting common functionality for rpm based distros 2013-08-20 16:44:19 -04:00
selinux-permissive An element for putting SELinux in permissive mode 2013-05-14 11:56:28 +12:00
serial-console Add an element to configure a serial console. 2013-05-10 07:38:31 +12:00
source-repositories Remove github references 2013-09-18 08:17:10 -05:00
ubuntu Use --numeric-owner when extracting base image 2013-10-08 22:45:51 +11:00
vm Move textmode forcer to vm element. 2013-09-18 01:57:35 +01:00
yum Add yum element. 2013-08-14 18:26:51 -04:00