sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
authorMike Gilbert <floppym@gentoo.org>
Sun, 31 Dec 2017 15:18:27 +0000 (10:18 -0500)
committerMike Gilbert <floppym@gentoo.org>
Tue, 2 Jan 2018 02:48:06 +0000 (21:48 -0500)
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 [new file with mode: 0644]
sys-apps/portage/portage-2.3.19-r1.ebuild [moved from sys-apps/portage/portage-2.3.19.ebuild with 99% similarity]
sys-apps/portage/portage-9999.ebuild

diff --git a/sys-apps/portage/files/portage-ccache.conf b/sys-apps/portage/files/portage-ccache.conf
new file mode 100644 (file)
index 0000000..37857fd
--- /dev/null
@@ -0,0 +1,2 @@
+# Prevent ccache files from being cleaned
+x /var/tmp/ccache
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 b4f03d91d2ded9c7e3f70cce92e196bb8bdb569c..1c78b4a699f72c509695122e586a451164b2db1a 100644 (file)
@@ -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'
index adb4f2b5bde8cfb648b074c32f5797b97a04d006..e025371418afde09bb20588b45f9fdef34b56bd5 100644 (file)
@@ -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'