By default, systemd-tmpfiles removes files older than 30 days from /var/tmp. The default portage config sets CCACHE_DIR=/var/tmp/ccache.
Bug: https://bugs.gentoo.org/490676#c14 Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37 --- sys-apps/portage/files/portage-ccache.conf | 2 ++ sys-apps/portage/portage-2.3.19.ebuild | 4 +++- sys-apps/portage/portage-9999.ebuild | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 sys-apps/portage/files/portage-ccache.conf diff --git a/sys-apps/portage/files/portage-ccache.conf b/sys-apps/portage/files/portage-ccache.conf new file mode 100644 index 000000000000..37857fde319b --- /dev/null +++ b/sys-apps/portage/files/portage-ccache.conf @@ -0,0 +1,2 @@ +# Prevent ccache files from being cleaned +x /var/tmp/ccache diff --git a/sys-apps/portage/portage-2.3.19.ebuild b/sys-apps/portage/portage-2.3.19.ebuild index b4f03d91d2de..1c78b4a699f7 100644 --- a/sys-apps/portage/portage-2.3.19.ebuild +++ b/sys-apps/portage/portage-2.3.19.ebuild @@ -10,7 +10,7 @@ PYTHON_COMPAT=( ) PYTHON_REQ_USE='bzip2(+),threads(+)' -inherit distutils-r1 +inherit distutils-r1 tmpfiles DESCRIPTION="Portage is the package management and distribution system for Gentoo" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" @@ -203,6 +203,8 @@ python_install_all() { esetup.py "${targets[@]}" fi + dotmpfiles "${FILESDIR}"/portage-ccache.conf + # Due to distutils/python-exec limitations # these must be installed to /usr/bin. local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index adb4f2b5bde8..e025371418af 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -10,7 +10,7 @@ PYTHON_COMPAT=( ) PYTHON_REQ_USE='bzip2(+),threads(+)' -inherit distutils-r1 git-r3 +inherit distutils-r1 git-r3 tmpfiles DESCRIPTION="Portage is the package management and distribution system for Gentoo" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" @@ -202,6 +202,8 @@ python_install_all() { esetup.py "${targets[@]}" fi + dotmpfiles "${FILESDIR}"/portage-ccache.conf + # Due to distutils/python-exec limitations # they must be installed to /usr/bin. local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' -- 2.16.0.rc0