commit:     e5f430619b1dbdce1d9ba7836db55fee065798dd
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 31 15:18:27 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 02:48:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5f43061

sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup

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 => portage-2.3.19-r1.ebuild} | 4 +++-
 sys-apps/portage/portage-9999.ebuild                                 | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys-apps/portage/files/portage-ccache.conf 
b/sys-apps/portage/files/portage-ccache.conf
new file mode 100644
index 00000000000..37857fde319
--- /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-r1.ebuild
similarity index 99%
rename from sys-apps/portage/portage-2.3.19.ebuild
rename to sys-apps/portage/portage-2.3.19-r1.ebuild
index b4f03d91d2d..1c78b4a699f 100644
--- a/sys-apps/portage/portage-2.3.19.ebuild
+++ b/sys-apps/portage/portage-2.3.19-r1.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 adb4f2b5bde..e025371418a 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'

Reply via email to