commit:     71dd5e89eaa5868418e13da6605fe3873939c60b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 14 03:44:08 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 14 03:44:56 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=71dd5e89

estrip: silence noise from objcopy if build ID section doesn't exist

This is a tiny fix suitable for backporting into the ebuild until
the refactoring for estrip lands.

It avoids noise when there's no build ID section to update w/ a salted
replacement.

Bug: https://bugs.gentoo.org/968220
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/estrip | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/estrip b/bin/estrip
index 6e2a5b6235..54c5a6e33f 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -171,7 +171,7 @@ save_elf_debug() {
 
                                        # We need to process the splitdebug 
file too
                                        # if we're doing it at this late 
juncture (bug #968220)
-                                       "${name_of[objcopy]}" --dump-section 
.note.gnu.build-id="${inode_link}_buildid" "${src}" \
+                                       "${name_of[objcopy]}" --dump-section 
.note.gnu.build-id="${inode_link}_buildid" "${src}" 2>/dev/null \
                                                && "${name_of[objcopy]}" 
--update-section .note.gnu.build-id="${inode_link}_buildid" "${dst}"
                                        rm -f "${inode_link}_buildid"
                                elif ! contains_word buildid 
"${warned_for[debugedit]}"; then

Reply via email to