Skip to contentSkip to conversation

package.py and selftest-hardlink backport request

scarthgap Mark Hatle 1 participant 1 message Jul 23, 2024

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

I'm requesting the following changes be backported to scarthgap. The commits should apply directly. Any questions, let me know.

commit def276f0c4c43fa4b95b7b38a944de7cc7e9286f

Author: Mark Hatle <[email protected]>
Date:   Fri Jul 19 13:58:16 2024 -0500

package.py: Fix static debuginfo split

Fix:
NameError: name 'shutil' is not defined

(From OE-Core rev: 13bdd750ae54d57a5f459e4b7d8636c864978241)

commit fa894486a99237b56469354c24ef913a96753aaf

Author: Mark Hatle <[email protected]>
Date:   Fri Jul 19 13:58:17 2024 -0500

package.py: Fix static library processing

When PACKAGE_STRIP_STATIC is enabled the system did not pay attention to hardlinks. This could trigger a race condition during stripping of static libraries where multiple strips (through hardlinks) could run at the same time triggering a truncated or modified file error.

The hardlink breaking code is based on the existing code for elf files, but due to the nature of the symlinks needed to be done in a separate block of code.

Add support for static-library debugfs hardlinking through the existing inode processing code.

Print a note to the logs if the link target can't be found. This isn't strictly an error, but may be useful for debugging an issue where a file isn't present.

(From OE-Core rev: ff371d69f60a1529ed456acb7d8e9305242e74bd)

commit 4462724cab96ed3990fdf9b30edcea2adc9095ee

Author: Mark Hatle <[email protected]>
Date:   Fri Jul 19 13:58:18 2024 -0500

selftest-hardlink: Add additional test cases

Additional test cases for debug symlink generation both binaries and static libraries.

This also has the side effect of testing for race conditions in the hardlink debug generation and stripping.

(From OE-Core rev: 7171f41c07a39a7543bb64f075d38b8e74563089)