Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sat, 06 Aug 2022 21:01:28
Message-Id: 1659819628.4af780be38037391751bccc6e15fc2561b8970e0.sam@gentoo
1 commit: 4af780be38037391751bccc6e15fc2561b8970e0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 1 01:40:44 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 6 21:00:28 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4af780be
7
8 estrip: use while/read for prepstrip (< EAPI 7)
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 bin/estrip | 9 ++++-----
13 1 file changed, 4 insertions(+), 5 deletions(-)
14
15 diff --git a/bin/estrip b/bin/estrip
16 index f45211bdb..0ed35111d 100755
17 --- a/bin/estrip
18 +++ b/bin/estrip
19 @@ -419,9 +419,10 @@ while read -r x ; do
20 done < <(
21 # NEEDED may not exist for some packages (bug #862606)
22 if [[ -f "${PORTAGE_BUILDDIR}"/build-info/NEEDED ]] ; then
23 - needed_contents=$(cat "${PORTAGE_BUILDDIR}"/build-info/NEEDED | cut -d ' ' -f1 | sed -e "s:^:${D%/}:")
24 - else
25 - needed_contents=""
26 + while IFS= read -r needed_entry ; do
27 + needed_entry="${needed_entry% *}"
28 + needed_contents+=( "${D%/}${needed_entry}" )
29 + done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED
30 fi
31
32 # Use sort -u to eliminate duplicates (bug #445336).
33 @@ -429,8 +430,6 @@ done < <(
34 [[ -n ${needed_contents[@]} ]] && printf "%s\n" "${needed_contents[@]}"
35 find "$@" -type f ! -type l -name '*.a'
36 ) | LC_ALL=C sort -u
37 -
38 - unset needed_contents
39 )
40 else
41 while IFS= read -d '' -r x ; do