scripts: Fix eu-strip for files with 'debug' in pathname 24/232724/2 accepted/tizen_6.0_base_tool_hotfix tizen_6.0_base_hotfix accepted/tizen/6.0/base/20201029.105819 accepted/tizen/6.0/base/tool/20201029.111542 accepted/tizen/6.0/base/tool/hotfix/20201030.124344 accepted/tizen/6.0/base/tool/hotfix/20201102.085444 accepted/tizen/base/20200608.211044 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 submit/tizen_base/20200507.115505 submit/tizen_base/20200511.102732 submit/tizen_base/20200604.081031 tizen_6.0.m2_release
authorSlava Barinov <v.barinov@samsung.com>
Thu, 7 May 2020 08:45:28 +0000 (11:45 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 7 May 2020 11:41:06 +0000 (11:41 +0000)
find-debuginfo.sh erroneously detected files with 'debug' in name as
files which do have debuginfo sections.

Change-Id: Ie18714130f2ee315cdabf56e521eb6f63cb98e8b
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
scripts/find-debuginfo.sh

index f2cc8b8..c5bb419 100755 (executable)
@@ -281,7 +281,7 @@ $strict || strict_error=WARNING
 find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm /111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort -z |
 xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
 while read nlinks inum f; do
-  case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
+  case $(objdump -h $f 2>/dev/null | sed -n '/^Sections:/,$p' | egrep -o '(debug[\.a-z_]*|gnu.version)') in
     *debuglink*) continue ;;
     *debug*) ;;
     *gnu.version*)