$ grep -Er '\${#E?D}' * bin/estrip: [ -L "${buildid_file}".debug ] || ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug" bin/estrip: [ -L "${buildid_file}" ] || ln -s "/${x:${#D}}" "${buildid_file}" bin/estrip: __vecho " ${x:${#ED}}" bin/estrip: __vecho " ${x:${#ED}}" The 'ln' lines are used with FEATURES="... splitdebug" and LDFLAGS="... -Wl,--build-id". Result is that, when using EAPI >= 7, symbolic links point to targets with "//". Example for EAPI="6": $ cd "${D}" $ ls usr/lib/debug/.build-id/* usr/lib/debug/.build-id/54: total 8.0K drwxr-xr-x 2 0 0 4.0K 2019-05-10-17-16-18 ./ drwxr-xr-x 10 0 0 4.0K 2019-05-10-17-16-19 ../ lrwxrwxrwx 1 0 0 23 2019-05-10-17-16-18 7df414750b420127cfe825e440e47f21219ef7 -> /usr/lib64/libtest1.so lrwxrwxrwx 1 0 0 34 2019-05-10-17-16-18 7df414750b420127cfe825e440e47f21219ef7.debug -> ../../usr/lib64/libtest1.so.debug usr/lib/debug/.build-id/ce: total 8.0K drwxr-xr-x 2 0 0 4.0K 2019-05-10-17-16-18 ./ drwxr-xr-x 10 0 0 4.0K 2019-05-10-17-16-19 ../ lrwxrwxrwx 1 0 0 23 2019-05-10-17-16-18 4fd94daf925577adcaa3c32fdc6bd4f803f423 -> /usr/lib64/libtest2.so lrwxrwxrwx 1 0 0 34 2019-05-10-17-16-18 4fd94daf925577adcaa3c32fdc6bd4f803f423.debug -> ../../usr/lib64/libtest2.so.debug Example for EAPI="7": $ cd "${D}" $ ls usr/lib/debug/.build-id/* usr/lib/debug/.build-id/54: total 8.0K drwxr-xr-x 2 0 0 4.0K 2019-05-10-17-16-55 ./ drwxr-xr-x 10 0 0 4.0K 2019-05-10-17-16-56 ../ lrwxrwxrwx 1 0 0 24 2019-05-10-17-16-55 7df414750b420127cfe825e440e47f21219ef7 -> //usr/lib64/libtest1.so lrwxrwxrwx 1 0 0 35 2019-05-10-17-16-55 7df414750b420127cfe825e440e47f21219ef7.debug -> ../..//usr/lib64/libtest1.so.debug usr/lib/debug/.build-id/ce: total 8.0K drwxr-xr-x 2 0 0 4.0K 2019-05-10-17-16-55 ./ drwxr-xr-x 10 0 0 4.0K 2019-05-10-17-16-56 ../ lrwxrwxrwx 1 0 0 24 2019-05-10-17-16-55 4fd94daf925577adcaa3c32fdc6bd4f803f423 -> //usr/lib64/libtest2.so lrwxrwxrwx 1 0 0 35 2019-05-10-17-16-55 4fd94daf925577adcaa3c32fdc6bd4f803f423.debug -> ../..//usr/lib64/libtest2.so.debug The '__vecho' lines are used only for output. Result is that, when using EAPI < 7, printed paths do not start with any "/", while when using EAPI >= 7, printed paths start with "/". Some other messages from Portage (e.g. some QA notices) print paths starting with "/" for files actually present in ${D}, and this actually looks better. Example for EAPI="6": strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version usr/lib64/libtest1.so usr/lib64/libtest2.so Example for EAPI="7": strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version /usr/lib64/libtest1.so /usr/lib64/libtest2.so
Created attachment 575980 [details, diff] Patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=decce090cf8625eef45461992e5f52c0be0c1a7d commit decce090cf8625eef45461992e5f52c0be0c1a7d Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-05-10 19:31:56 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-05-20 03:41:18 +0000 estrip: Fix inconsistent behavior between EAPI < 7 and EAPI >= 7. Bug: https://bugs.gentoo.org/685532 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/estrip | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)