summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-03-20 13:15:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-20 17:49:16 +0000
commit769a4479e123a5c2951eab8915cbd2b29d82c7f9 (patch)
tree35d2cb1e50830bdf510f32e6c6bbaf61b5f79bee /meta/lib
parente1a6ae2309d6729c44b01fe3be76b5eea633de61 (diff)
downloadpoky-769a4479e123a5c2951eab8915cbd2b29d82c7f9.tar.gz
spdx30: handle links to inaccessible locations
This is the same as e105befbe4ee0d85e94c2048a744f0373e2dbcdf on additional place in the code. When a link is pointing to location inaccessible to build user (e.g. "/root/something"), filepath.is_file() throws "PermissionError: [Errno 13] Permission denied". Fix this by first checking if it is a link. (From OE-Core rev: 26f35f866cf7888431963cf4fc5d2019cd28de74) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/spdx30_tasks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 1841b0de4a..1629ed69ce 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -1067,7 +1067,7 @@ def create_rootfs_spdx(d):
1067 filenames.sort() 1067 filenames.sort()
1068 for fn in filenames: 1068 for fn in filenames:
1069 fpath = Path(dirpath) / fn 1069 fpath = Path(dirpath) / fn
1070 if not fpath.is_file() or fpath.is_symlink(): 1070 if fpath.is_symlink() or not fpath.is_file():
1071 continue 1071 continue
1072 1072
1073 relpath = str(fpath.relative_to(image_rootfs)) 1073 relpath = str(fpath.relative_to(image_rootfs))