commit:     32e6c7615985deca4b0522283fb274d2f8c97ee5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  7 05:33:40 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan  7 05:33:40 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=32e6c761

estrip: copy build ID for splitdebug file from original source w/ 
FEATURES=-installources

This is another attempt for what wa reverted in
e12ac86cb72002b216be0ae316ae7062a91268fa.

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

 bin/estrip | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bin/estrip b/bin/estrip
index 590e40f76e..6e2a5b6235 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -168,6 +168,12 @@ save_elf_debug() {
                                        buildid=$("${name_of[debugedit]}" -i \
                                                -s "${CATEGORY}/${PF}:${SLOT}" \
                                                "${src}")
+
+                                       # 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]}" 
--update-section .note.gnu.build-id="${inode_link}_buildid" "${dst}"
+                                       rm -f "${inode_link}_buildid"
                                elif ! contains_word buildid 
"${warned_for[debugedit]}"; then
                                        warned_for[debugedit]+=" buildid"
                                        stash_warning <<-'EOF'

Reply via email to