From c37c809c89a0ce0ccaef1a38599bc00afbca1179 Mon Sep 17 00:00:00 2001 From: Alphat-PC Date: Wed, 13 Mar 2013 20:23:58 -0700 Subject: [PATCH] prepstrip: fix readelf Build ID for bug #460510 --- bin/ebuild-helpers/prepstrip | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index fb20777e8..d791a113b 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -159,8 +159,7 @@ save_elf_debug() { # if we don't already have build-id from debugedit, look it up if [[ -z ${buildid} ]] ; then # convert the readelf output to something useful - buildid=$(${READELF} -x .note.gnu.build-id "${x}" 2>/dev/null \ - | awk '$NF ~ /GNU/ { getline; printf $2$3$4$5; getline; print $2 }') + buildid=$(${READELF} -n "${x}" 2>/dev/null | awk '/Build ID:/{ print $NF; exit }') fi if [[ -n ${buildid} ]] ; then local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}" -- 2.26.2