* [PATCH] package.bbclass: fix image_debugfs symlinks
@ 2020-11-04 22:47 William Hauser
2020-11-08 9:29 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: William Hauser @ 2020-11-04 22:47 UTC (permalink / raw)
To: openembedded-core; +Cc: William Hauser, William Hauser
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.
Signed-off-by: William Hauser <william.hauser@meraki.com>
---
meta/classes/package.bbclass | 8 --------
1 file changed, 8 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e6236c0bb2..47f3df2e13 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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)
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [OE-core] [PATCH] package.bbclass: fix image_debugfs symlinks
2020-11-04 22:47 [PATCH] package.bbclass: fix image_debugfs symlinks William Hauser
@ 2020-11-08 9:29 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2020-11-08 9:29 UTC (permalink / raw)
To: william.hauser, openembedded-core; +Cc: William Hauser, William Hauser
On Wed, 2020-11-04 at 14:47 -0800, William Hauser via
lists.openembedded.org wrote:
> 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.
>
> Signed-off-by: William Hauser <william.hauser@meraki.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-08 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 22:47 [PATCH] package.bbclass: fix image_debugfs symlinks William Hauser
2020-11-08 9:29 ` [OE-core] " Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox