From: Alphat-PC Date: Thu, 14 Mar 2013 03:23:58 +0000 (-0700) Subject: prepstrip: fix readelf Build ID for bug #460510 X-Git-Tag: v2.2.0_alpha167~36 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c37c809c89a0ce0ccaef1a38599bc00afbca1179;p=portage.git prepstrip: fix readelf Build ID for bug #460510 --- 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}"