diff --git a/diskimage_builder/elements/base/README.rst b/diskimage_builder/elements/base/README.rst index c2a4412c..1984ea86 100644 --- a/diskimage_builder/elements/base/README.rst +++ b/diskimage_builder/elements/base/README.rst @@ -26,9 +26,3 @@ Notes: being missing, consider installing/generating the relevant locale. This may be as simple as having language-pack-XX installed in the pre-install stage - - * This element ensures /tmp/ccache will be available in the chroot - during the root, extra-data, pre-install, install and post-install - stages. /tmp/ccache is unavailable during block-device, finalise - and cleanup stages as it will have been automatically unmounted - by then. diff --git a/diskimage_builder/elements/base/cleanup.d/01-ccache b/diskimage_builder/elements/base/cleanup.d/01-ccache deleted file mode 100755 index 396d1a4a..00000000 --- a/diskimage_builder/elements/base/cleanup.d/01-ccache +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# As this is run in cleanup, it's already been automatically unmounted, -# so all we need to do here is remove the directory -sudo rmdir $TMP_MOUNT_PATH/tmp/ccache || true diff --git a/diskimage_builder/elements/base/environment.d/10-ccache.bash b/diskimage_builder/elements/base/environment.d/10-ccache.bash deleted file mode 100644 index 7359b3f3..00000000 --- a/diskimage_builder/elements/base/environment.d/10-ccache.bash +++ /dev/null @@ -1,7 +0,0 @@ -# Put ccache in path for known compilers -for CCACHEDIR in "/usr/lib/ccache" "/usr/lib64/ccache" ; do - if ! [[ "$PATH" =~ "$CCACHEDIR" ]] ; then - export PATH=$CCACHEDIR:$PATH - fi -done -export CCACHE_DIR=/tmp/ccache diff --git a/diskimage_builder/elements/base/package-installs.yaml b/diskimage_builder/elements/base/package-installs.yaml deleted file mode 100644 index afe7c77a..00000000 --- a/diskimage_builder/elements/base/package-installs.yaml +++ /dev/null @@ -1 +0,0 @@ -ccache_package: diff --git a/diskimage_builder/elements/base/pkg-map b/diskimage_builder/elements/base/pkg-map index 316bd849..f9694a10 100644 --- a/diskimage_builder/elements/base/pkg-map +++ b/diskimage_builder/elements/base/pkg-map @@ -4,7 +4,6 @@ "iscsi_package": "iscsi-initiator-utils" }, "gentoo": { - "ccache_package": "dev-util/ccache", "curl": "net-misc/curl", "dhcp_client": "net-misc/dhcp", "extlinux": "sys-boot/syslinux", @@ -26,7 +25,6 @@ } }, "default": { - "ccache_package": "ccache", "iscsi_package": "open-iscsi" } } diff --git a/diskimage_builder/elements/base/root.d/01-ccache b/diskimage_builder/elements/base/root.d/01-ccache deleted file mode 100755 index 0a61603c..00000000 --- a/diskimage_builder/elements/base/root.d/01-ccache +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Don't do anything if already mounted (if disk-image-create is invoked with -# no elements specified, this hook actually fires twice, once during -# `run_d root` for the base element, then again when `run_d root` is called -# after automatically pulling in the Ubuntu element) -grep " $TMP_MOUNT_PATH/tmp/ccache" /proc/mounts && exit - -DIB_CCACHE_DIR=${DIB_CCACHE_DIR:-$DIB_IMAGE_CACHE/ccache} -mkdir -p $DIB_CCACHE_DIR - -sudo mkdir -p $TMP_MOUNT_PATH/tmp/ccache -sudo mount --bind $DIB_CCACHE_DIR $TMP_MOUNT_PATH/tmp/ccache diff --git a/diskimage_builder/elements/rhel-common/pre-install.d/10-rhel-blacklist b/diskimage_builder/elements/rhel-common/pre-install.d/10-rhel-blacklist index 6c1c1911..7589582c 100755 --- a/diskimage_builder/elements/rhel-common/pre-install.d/10-rhel-blacklist +++ b/diskimage_builder/elements/rhel-common/pre-install.d/10-rhel-blacklist @@ -6,4 +6,7 @@ fi set -eu set -o pipefail -echo "ccache dkms" > /tmp/yum-blacklist +# This is packages that are required for installation by other +# elements (like base) but aren't actually available for this +# platform. This is a bit of a hack +echo "dkms" > /tmp/yum-blacklist diff --git a/diskimage_builder/elements/zypper/install.d/01-ccache-symlinks b/diskimage_builder/elements/zypper/install.d/01-ccache-symlinks deleted file mode 100755 index 9ed6cfe4..00000000 --- a/diskimage_builder/elements/zypper/install.d/01-ccache-symlinks +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Setup ccache symlinks, as openSUSE's ccache package doesn't -# include them. -mkdir -p /usr/lib/ccache -for tool in cc gcc; do - ln -s /usr/bin/ccache /usr/lib/ccache/$tool -done diff --git a/doc/source/developer/caches.rst b/doc/source/developer/caches.rst index 6c80b9f9..89db95f0 100644 --- a/doc/source/developer/caches.rst +++ b/doc/source/developer/caches.rst @@ -32,12 +32,6 @@ source-repositories Git repositories and tarballs obtained via the :doc:`../elements/source-repositories/README` element will be cached. -C and C++ compilation ---------------------- - -Ccache is configured by the :doc:`../elements/base/README` element. Any -compilation that honours ccache will be cached. - PyPI ----