package.bbclass: fix image_debugfs symlinks
PATCH 1/1 package.bbclass: fix image_debugfs symlinks
Allow symlinks to be made in the debugfs by removing an incorrect check that would always prevent symlinks from being transferred over.
The comment in this code indicates that the code is meant to ensure symlinks are only copied to the debugfs if their target has already been copied, but instead checks for the existence of the symlink that has yet to be created. As a result this check always fails.
This check is safe to get rid of since we will only attempt to copy a symlink to the debugfs if it's original target exists and is an ELF. It is, however, still possible for a dead symlink to end up in the debugfs if its original target was stripped.
--- meta/classes/package.bbclass | 8 -------- 1 file changed, 8 deletions(-)
meta/classes/package.bbclass +0 -8
@@ -1258,14 +1258,6 @@ python split_and_strip_files () { src = file[len(dvar):] dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend fpath = dvar + dest - # Skip it if the target doesn't exist - try: - s = os.stat(fpath) - except OSError as e: - (err, strerror) = e.args - if err != errno.ENOENT: - raise - continue ltarget = symlinks[file] lpath = os.path.dirname(ltarget)
Signature · 1 line
2.15.1
Quoted 19 lines · William Hauser via lists.openembedded.org
Allow symlinks to be made in the debugfs by removing an incorrect check that
would always prevent symlinks from being transferred over.The comment in this code indicates that the code is meant to ensure symlinks
are only copied to the debugfs if their target has already been copied, but
instead checks for the existence of the symlink that has yet to be created.
As a result this check always fails.This check is safe to get rid of since we will only attempt to copy a symlink to the debugfs if it's original target exists and is an ELF. It
is, however, still possible for a dead symlink to end up in the debugfs
if its original target was stripped.
Quoted 4 lines
Signed-off-by William Hauser <[email protected]>--- meta/classes/package.bbclass | 8 -------- 1 file changed, 8 deletions(-)
Unfortunately this patch did show failures in testing:
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1536
(and the other selftests failed the same way).
oe-selftest -r imagefeatures.ImageFeatures.test_image_gen_debugfs
is how to run that test.
Cheers,
Richard