Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 04 Dec 2018 11:06:19
Message-Id: 1543921557.d266c61788fe8457e0ed0d7674bcb5d963692e8c.slyfox@gentoo
1 commit: d266c61788fe8457e0ed0d7674bcb5d963692e8c
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 4 09:05:17 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 4 11:05:57 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d266c617
7
8 toolchain.eclass: drop info/dir index, bug #672408
9
10 As explained by Zac in #672408 prepinfo() was used to drop 'info/dir'
11 index to allow portage regenerate it.
12
13 gcc package does not always install 'info/dir' files (USE-dependent).
14 This causes nondeterminism for 'info/dir' to be owned or be an orphan
15 file.
16
17 This change drops 'info/dir' unconditionally to avoid owned/orphan
18 collisions and always make it an orphan file.
19
20 Reported-by: Michal Jakubowski
21 Bug: https://bugs.gentoo.org/672408
22 Bug: https://bugs.gentoo.org/587316
23 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
24
25 eclass/toolchain.eclass | 8 ++++++++
26 1 file changed, 8 insertions(+)
27
28 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
29 index 94f2d3369af..19564a0652e 100644
30 --- a/eclass/toolchain.eclass
31 +++ b/eclass/toolchain.eclass
32 @@ -1851,6 +1851,14 @@ toolchain_src_install() {
33 fi
34 fi
35 fi
36 +
37 + # portage regenerates 'dir' files on it's own: bug #672408
38 + # Drop 'dir' files to avoid collisions.
39 + if [[ -f "${D}${DATAPATH}"/info/dir ]]; then
40 + einfo "Deleting '${D}${DATAPATH}/info/dir'"
41 + rm "${D}${DATAPATH}"/info/dir || die
42 + fi
43 +
44 # prune empty dirs left behind
45 find "${ED}" -depth -type d -delete 2>/dev/null