diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-07-17 20:59:49 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2021-07-17 15:09:32 -0700 |
commit | e083c8bf20d8488d329e3dccd643c28429e6fe30 (patch) | |
tree | 89c28dd0228ab60767582f53b0b3d3899e645783 | |
parent | man/make.conf.5: remove mention of zlib USE flag (diff) | |
download | gentoo-portage-e083c8bf20d8488d329e3dccd643c28429e6fe30.tar.xz gentoo-portage-e083c8bf20d8488d329e3dccd643c28429e6fe30.zip |
bin/estrip: avoid copying directories in FEATURES=installsources
Initially problem is noticed on gcc-11 as a full ${WORKDIR} syncing
into /usr/src/debug. It happens because `debug.sources` sometimes
contains directory. For example on bash-5 it has:
$ grep -zv '/<[^/>]*>$' debug.sources | LANG=C sort -z -u | sed -e 's/\x00/\n/g'
bash-5.0/
bash-5.0/alias.c
...
This causes syncing object files, config.log, final binaries
and other unexpected data. The change avoids syncking paths
that end with '/'.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-x | bin/estrip | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/estrip b/bin/estrip index 7ef1ec35c..665f377fd 100755 --- a/bin/estrip +++ b/bin/estrip @@ -464,7 +464,9 @@ if [[ -s ${tmpdir}/debug.sources ]] && \ then __vecho "installsources: rsyncing source files" [[ -d ${D%/}/${prepstrip_sources_dir#/} ]] || mkdir -p "${D%/}/${prepstrip_sources_dir#/}" - grep -zv '/<[^/>]*>$' "${tmpdir}"/debug.sources | \ + # skip installation of ".../<foo>" (system headers? why inner slashes are forbidden?) + # skip syncing of ".../foo/" (complete directories) + grep -zv -e '/<[^/>]*>$' -e '/$' "${tmpdir}"/debug.sources | \ (cd "${WORKDIR}"; LANG=C sort -z -u | \ rsync -tL0 --chmod=ugo-st,a+r,go-w,Da+x,Fa-x --files-from=- "${WORKDIR}/" "${D%/}/${prepstrip_sources_dir#/}/" ) |