Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sat, 17 Jul 2021 22:16:59
Message-Id: 1626559772.e083c8bf20d8488d329e3dccd643c28429e6fe30.zmedico@gentoo
1 commit: e083c8bf20d8488d329e3dccd643c28429e6fe30
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 19:59:49 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 17 22:09:32 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e083c8bf
7
8 bin/estrip: avoid copying directories in FEATURES=installsources
9
10 Initially problem is noticed on gcc-11 as a full ${WORKDIR} syncing
11 into /usr/src/debug. It happens because `debug.sources` sometimes
12 contains directory. For example on bash-5 it has:
13
14 $ grep -zv '/<[^/>]*>$' debug.sources | LANG=C sort -z -u | sed -e 's/\x00/\n/g'
15 bash-5.0/
16 bash-5.0/alias.c
17 ...
18
19 This causes syncing object files, config.log, final binaries
20 and other unexpected data. The change avoids syncking paths
21 that end with '/'.
22
23 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
24 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
25
26 bin/estrip | 4 +++-
27 1 file changed, 3 insertions(+), 1 deletion(-)
28
29 diff --git a/bin/estrip b/bin/estrip
30 index 7ef1ec35c..665f377fd 100755
31 --- a/bin/estrip
32 +++ b/bin/estrip
33 @@ -464,7 +464,9 @@ if [[ -s ${tmpdir}/debug.sources ]] && \
34 then
35 __vecho "installsources: rsyncing source files"
36 [[ -d ${D%/}/${prepstrip_sources_dir#/} ]] || mkdir -p "${D%/}/${prepstrip_sources_dir#/}"
37 - grep -zv '/<[^/>]*>$' "${tmpdir}"/debug.sources | \
38 + # skip installation of ".../<foo>" (system headers? why inner slashes are forbidden?)
39 + # skip syncing of ".../foo/" (complete directories)
40 + grep -zv -e '/<[^/>]*>$' -e '/$' "${tmpdir}"/debug.sources | \
41 (cd "${WORKDIR}"; LANG=C sort -z -u | \
42 rsync -tL0 --chmod=ugo-st,a+r,go-w,Da+x,Fa-x --files-from=- "${WORKDIR}/" "${D%/}/${prepstrip_sources_dir#/}/" )