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