Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
Date: Sun, 31 Dec 2017 15:23:02
Message-Id: 20171231152253.14966-2-floppym@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/2] tmpfiles.eclass: allow EAPI 5 usage by Mike Gilbert
1 By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
2 The default portage config sets CCACHE_DIR=/var/tmp/ccache.
3
4 Bug: https://bugs.gentoo.org/490676#c14
5 Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
6 ---
7 sys-apps/portage/files/portage-ccache.conf | 2 ++
8 sys-apps/portage/portage-2.3.19.ebuild | 4 +++-
9 sys-apps/portage/portage-9999.ebuild | 4 +++-
10 3 files changed, 8 insertions(+), 2 deletions(-)
11 create mode 100644 sys-apps/portage/files/portage-ccache.conf
12
13 diff --git a/sys-apps/portage/files/portage-ccache.conf b/sys-apps/portage/files/portage-ccache.conf
14 new file mode 100644
15 index 000000000000..37857fde319b
16 --- /dev/null
17 +++ b/sys-apps/portage/files/portage-ccache.conf
18 @@ -0,0 +1,2 @@
19 +# Prevent ccache files from being cleaned
20 +x /var/tmp/ccache
21 diff --git a/sys-apps/portage/portage-2.3.19.ebuild b/sys-apps/portage/portage-2.3.19.ebuild
22 index b4f03d91d2de..1c78b4a699f7 100644
23 --- a/sys-apps/portage/portage-2.3.19.ebuild
24 +++ b/sys-apps/portage/portage-2.3.19.ebuild
25 @@ -10,7 +10,7 @@ PYTHON_COMPAT=(
26 )
27 PYTHON_REQ_USE='bzip2(+),threads(+)'
28
29 -inherit distutils-r1
30 +inherit distutils-r1 tmpfiles
31
32 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
33 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
34 @@ -203,6 +203,8 @@ python_install_all() {
35 esetup.py "${targets[@]}"
36 fi
37
38 + dotmpfiles "${FILESDIR}"/portage-ccache.conf
39 +
40 # Due to distutils/python-exec limitations
41 # these must be installed to /usr/bin.
42 local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
43 diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
44 index adb4f2b5bde8..e025371418af 100644
45 --- a/sys-apps/portage/portage-9999.ebuild
46 +++ b/sys-apps/portage/portage-9999.ebuild
47 @@ -10,7 +10,7 @@ PYTHON_COMPAT=(
48 )
49 PYTHON_REQ_USE='bzip2(+),threads(+)'
50
51 -inherit distutils-r1 git-r3
52 +inherit distutils-r1 git-r3 tmpfiles
53
54 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
55 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
56 @@ -202,6 +202,8 @@ python_install_all() {
57 esetup.py "${targets[@]}"
58 fi
59
60 + dotmpfiles "${FILESDIR}"/portage-ccache.conf
61 +
62 # Due to distutils/python-exec limitations
63 # they must be installed to /usr/bin.
64 local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
65 --
66 2.16.0.rc0

Replies