commit: decce090cf8625eef45461992e5f52c0be0c1a7d Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> AuthorDate: Fri May 10 19:31:56 2019 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon May 20 03:41:18 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=decce090
estrip: Fix inconsistent behavior between EAPI < 7 and EAPI >= 7. Bug: https://bugs.gentoo.org/685532 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> bin/estrip | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/estrip b/bin/estrip index 6f9201d7e..6133c3dee 100755 --- a/bin/estrip +++ b/bin/estrip @@ -239,17 +239,18 @@ save_elf_debug() { local buildid_dir="${ED%/}/usr/lib/debug/.build-id/${buildid:0:2}" local buildid_file="${buildid_dir}/${buildid:2}" mkdir -p "${buildid_dir}" - [ -L "${buildid_file}".debug ] || ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug" - [ -L "${buildid_file}" ] || ln -s "/${x:${#D}}" "${buildid_file}" + [ -L "${buildid_file}".debug ] || ln -s "../../${x:$((${#d_noslash} + 1))}.debug" "${buildid_file}.debug" + [ -L "${buildid_file}" ] || ln -s "/${x:$((${#d_noslash} + 1))}" "${buildid_file}" fi } # Usage: process_elf <elf> process_elf() { local x=$1 inode_link=$2 strip_flags=${*:3} + local ed_noslash=${ED%/} local already_stripped lockfile xt_data - __vecho " ${x:${#ED}}" + __vecho " ${x:${#ed_noslash}}" # If two processes try to debugedit or strip the same hardlink at the # same time, it may corrupt files or cause loss of splitdebug info. @@ -308,8 +309,9 @@ process_elf() { # Usage: process_ar <ar archive> process_ar() { local x=$1 + local ed_noslash=${ED%/} - __vecho " ${x:${#ED}}" + __vecho " ${x:${#ed_noslash}}" if ${strip_this} ; then # If we have split debug enabled, then do not strip this.
