Message ID | 20250320121533.39356-1-peter.marko@siemens.com |
---|---|
State | Accepted, archived |
Commit | 26f35f866cf7888431963cf4fc5d2019cd28de74 |
Headers | show |
Series | spdx30: handle links to inaccessible locations | expand |
LGTM, Thanks Reviewed-by: Joshua Watt <JPEWhacker@gmail.com> On Thu, Mar 20, 2025 at 6:16 AM Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote: > > From: Peter Marko <peter.marko@siemens.com> > > 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. > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > --- > meta/lib/oe/spdx30_tasks.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > index 0618f2f139..bba11ae930 100644 > --- a/meta/lib/oe/spdx30_tasks.py > +++ b/meta/lib/oe/spdx30_tasks.py > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > filenames.sort() > for fn in filenames: > fpath = Path(dirpath) / fn > - if not fpath.is_file() or fpath.is_symlink(): > + if fpath.is_symlink() or not fpath.is_file(): > continue > > relpath = str(fpath.relative_to(image_rootfs)) > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#213385): https://lists.openembedded.org/g/openembedded-core/message/213385 > Mute This Topic: https://lists.openembedded.org/mt/111807091/3616693 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [JPEWhacker@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Thu, Mar 20, 2025 at 01:15:33PM +0100, Peter Marko wrote: > From: Peter Marko <peter.marko@siemens.com> > > 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. > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > --- > meta/lib/oe/spdx30_tasks.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This commit breaks building recipes here: ERROR: quilt-native-0.68-r0 do_create_spdx: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_create_spdx(d) 0003: File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/classes/create-spdx-3.0.bbclass', lineno: 135, function: do_create_spdx 0131: " 0132: 0133:python do_create_spdx() { 0134: import oe.spdx30_tasks *** 0135: oe.spdx30_tasks.create_spdx(d) 0136:} 0137:do_create_spdx[vardeps] += "\ 0138: SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ 0139: SPDX_PACKAGE_ADDITIONAL_PURPOSE \ File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/lib/oe/spdx30_tasks.py', lineno: 537, function: create_spdx 0533: ) 0534: 0535: cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), d.getVar("CVE_VERSION")) 0536: *** 0537: source_files = add_download_files(d, build_objset) 0538: build_inputs |= source_files 0539: 0540: recipe_spdx_license = add_license_expression( 0541: d, build_objset, d.getVar("LICENSE"), license_data File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/lib/oe/spdx30_tasks.py', lineno: 408, function: add_download_files 0404: creationInfo=objset.doc.creationInfo, 0405: name=file_name, 0406: software_primaryPurpose=primary_purpose, 0407: software_downloadLocation=oe.spdx_common.fetch_data_to_uri( *** 0408: fd, fd.name 0409: ), 0410: ) 0411: ) 0412: Exception: AttributeError: 'FetchData' object has no attribute 'name' ERROR: Logfile of failure stored in: /home/lumag/Projects/RPB/build-rpb/tmp-nodistro/work/x86_64-linux/quilt-native/0.68/temp/log.do_create_spdx.3116916 ERROR: Task (/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.68.bb:do_create_spdx) failed with exit code '1' Reverting this commit makes the error disappear. > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > index 0618f2f139..bba11ae930 100644 > --- a/meta/lib/oe/spdx30_tasks.py > +++ b/meta/lib/oe/spdx30_tasks.py > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > filenames.sort() > for fn in filenames: > fpath = Path(dirpath) / fn > - if not fpath.is_file() or fpath.is_symlink(): > + if fpath.is_symlink() or not fpath.is_file(): > continue > > relpath = str(fpath.relative_to(image_rootfs)) >
I think there is something else breaking your build. My commit changed function create_rootfs_spdx. That should not influence recipe spdx code... Did you try a build with my commit reverted? Peter > -----Original Message----- > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > Sent: Friday, March 21, 2025 13:38 > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > Cc: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > On Thu, Mar 20, 2025 at 01:15:33PM +0100, Peter Marko wrote: > > From: Peter Marko <peter.marko@siemens.com> > > > > 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. > > > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > > --- > > meta/lib/oe/spdx30_tasks.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > This commit breaks building recipes here: > > ERROR: quilt-native-0.68-r0 do_create_spdx: Error executing a python function in > exec_func_python() autogenerated: > > The stack trace of python calls that resulted in this exception/failure was: > File: 'exec_func_python() autogenerated', lineno: 2, function: <module> > 0001: > *** 0002:do_create_spdx(d) > 0003: > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > core/meta/classes/create-spdx-3.0.bbclass', lineno: 135, function: do_create_spdx > 0131: " > 0132: > 0133:python do_create_spdx() { > 0134: import oe.spdx30_tasks > *** 0135: oe.spdx30_tasks.create_spdx(d) > 0136:} > 0137:do_create_spdx[vardeps] += "\ > 0138: SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ > 0139: SPDX_PACKAGE_ADDITIONAL_PURPOSE \ > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > core/meta/lib/oe/spdx30_tasks.py', lineno: 537, function: create_spdx > 0533: ) > 0534: > 0535: cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), > d.getVar("CVE_VERSION")) > 0536: > *** 0537: source_files = add_download_files(d, build_objset) > 0538: build_inputs |= source_files > 0539: > 0540: recipe_spdx_license = add_license_expression( > 0541: d, build_objset, d.getVar("LICENSE"), license_data > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > core/meta/lib/oe/spdx30_tasks.py', lineno: 408, function: add_download_files > 0404: creationInfo=objset.doc.creationInfo, > 0405: name=file_name, > 0406: software_primaryPurpose=primary_purpose, > 0407: > software_downloadLocation=oe.spdx_common.fetch_data_to_uri( > *** 0408: fd, fd.name > 0409: ), > 0410: ) > 0411: ) > 0412: > Exception: AttributeError: 'FetchData' object has no attribute 'name' > > ERROR: Logfile of failure stored in: /home/lumag/Projects/RPB/build-rpb/tmp- > nodistro/work/x86_64-linux/quilt-native/0.68/temp/log.do_create_spdx.3116916 > ERROR: Task (/home/lumag/Projects/RPB/build- > rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/quilt/quilt- > native_0.68.bb:do_create_spdx) failed with exit code '1' > > Reverting this commit makes the error disappear. > > > > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > > index 0618f2f139..bba11ae930 100644 > > --- a/meta/lib/oe/spdx30_tasks.py > > +++ b/meta/lib/oe/spdx30_tasks.py > > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > > filenames.sort() > > for fn in filenames: > > fpath = Path(dirpath) / fn > > - if not fpath.is_file() or fpath.is_symlink(): > > + if fpath.is_symlink() or not fpath.is_file(): > > continue > > > > relpath = str(fpath.relative_to(image_rootfs)) > > > > -- > With best wishes > Dmitry
On Fri, 21 Mar 2025 at 14:58, Marko, Peter <Peter.Marko@siemens.com> wrote: > > I think there is something else breaking your build. > > My commit changed function create_rootfs_spdx. > That should not influence recipe spdx code... > Did you try a build with my commit reverted? As I wrote, reverting it makes the error disappear. > > Peter > > > -----Original Message----- > > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > Sent: Friday, March 21, 2025 13:38 > > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > > Cc: openembedded-core@lists.openembedded.org > > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > > > On Thu, Mar 20, 2025 at 01:15:33PM +0100, Peter Marko wrote: > > > From: Peter Marko <peter.marko@siemens.com> > > > > > > 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. > > > > > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > > > --- > > > meta/lib/oe/spdx30_tasks.py | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > This commit breaks building recipes here: > > > > ERROR: quilt-native-0.68-r0 do_create_spdx: Error executing a python function in > > exec_func_python() autogenerated: > > > > The stack trace of python calls that resulted in this exception/failure was: > > File: 'exec_func_python() autogenerated', lineno: 2, function: <module> > > 0001: > > *** 0002:do_create_spdx(d) > > 0003: > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > core/meta/classes/create-spdx-3.0.bbclass', lineno: 135, function: do_create_spdx > > 0131: " > > 0132: > > 0133:python do_create_spdx() { > > 0134: import oe.spdx30_tasks > > *** 0135: oe.spdx30_tasks.create_spdx(d) > > 0136:} > > 0137:do_create_spdx[vardeps] += "\ > > 0138: SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ > > 0139: SPDX_PACKAGE_ADDITIONAL_PURPOSE \ > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > core/meta/lib/oe/spdx30_tasks.py', lineno: 537, function: create_spdx > > 0533: ) > > 0534: > > 0535: cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), > > d.getVar("CVE_VERSION")) > > 0536: > > *** 0537: source_files = add_download_files(d, build_objset) > > 0538: build_inputs |= source_files > > 0539: > > 0540: recipe_spdx_license = add_license_expression( > > 0541: d, build_objset, d.getVar("LICENSE"), license_data > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > core/meta/lib/oe/spdx30_tasks.py', lineno: 408, function: add_download_files > > 0404: creationInfo=objset.doc.creationInfo, > > 0405: name=file_name, > > 0406: software_primaryPurpose=primary_purpose, > > 0407: > > software_downloadLocation=oe.spdx_common.fetch_data_to_uri( > > *** 0408: fd, fd.name > > 0409: ), > > 0410: ) > > 0411: ) > > 0412: > > Exception: AttributeError: 'FetchData' object has no attribute 'name' > > > > ERROR: Logfile of failure stored in: /home/lumag/Projects/RPB/build-rpb/tmp- > > nodistro/work/x86_64-linux/quilt-native/0.68/temp/log.do_create_spdx.3116916 > > ERROR: Task (/home/lumag/Projects/RPB/build- > > rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/quilt/quilt- > > native_0.68.bb:do_create_spdx) failed with exit code '1' > > > > Reverting this commit makes the error disappear. > > > > > > > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > > > index 0618f2f139..bba11ae930 100644 > > > --- a/meta/lib/oe/spdx30_tasks.py > > > +++ b/meta/lib/oe/spdx30_tasks.py > > > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > > > filenames.sort() > > > for fn in filenames: > > > fpath = Path(dirpath) / fn > > > - if not fpath.is_file() or fpath.is_symlink(): > > > + if fpath.is_symlink() or not fpath.is_file(): > > > continue > > > > > > relpath = str(fpath.relative_to(image_rootfs)) > > > > > > > -- > > With best wishes > > Dmitry
I believe that you have a problem with: * commit https://git.openembedded.org/openembedded-core/commit/?id=4859cdf97fd9a260036e148e25f0b78eb393df1e * commit https://git.openembedded.org/bitbake/commit/?id=2515fbd10824005fa7f34e87706000c079920366 Using new oe-core without matching bitbake change will lead to unknown attribute name since it was changed from names to name in both commits together. I can cleanly build core-image-minimal with spdx3 from latest poky master (which contains matching oe-core and bitbake versions). Maybe you have reverted whole oe-core update and not just my commit when looking for the breaking change? Peter > -----Original Message----- > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > Sent: Friday, March 21, 2025 14:10 > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > Cc: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > On Fri, 21 Mar 2025 at 14:58, Marko, Peter <Peter.Marko@siemens.com> wrote: > > > > I think there is something else breaking your build. > > > > My commit changed function create_rootfs_spdx. > > That should not influence recipe spdx code... > > Did you try a build with my commit reverted? > > As I wrote, reverting it makes the error disappear. > > > > > Peter > > > > > -----Original Message----- > > > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > Sent: Friday, March 21, 2025 13:38 > > > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > > > Cc: openembedded-core@lists.openembedded.org > > > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > > > > > On Thu, Mar 20, 2025 at 01:15:33PM +0100, Peter Marko wrote: > > > > From: Peter Marko <peter.marko@siemens.com> > > > > > > > > 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. > > > > > > > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > > > > --- > > > > meta/lib/oe/spdx30_tasks.py | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > This commit breaks building recipes here: > > > > > > ERROR: quilt-native-0.68-r0 do_create_spdx: Error executing a python function > in > > > exec_func_python() autogenerated: > > > > > > The stack trace of python calls that resulted in this exception/failure was: > > > File: 'exec_func_python() autogenerated', lineno: 2, function: <module> > > > 0001: > > > *** 0002:do_create_spdx(d) > > > 0003: > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > core/meta/classes/create-spdx-3.0.bbclass', lineno: 135, function: > do_create_spdx > > > 0131: " > > > 0132: > > > 0133:python do_create_spdx() { > > > 0134: import oe.spdx30_tasks > > > *** 0135: oe.spdx30_tasks.create_spdx(d) > > > 0136:} > > > 0137:do_create_spdx[vardeps] += "\ > > > 0138: SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ > > > 0139: SPDX_PACKAGE_ADDITIONAL_PURPOSE \ > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > core/meta/lib/oe/spdx30_tasks.py', lineno: 537, function: create_spdx > > > 0533: ) > > > 0534: > > > 0535: cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), > > > d.getVar("CVE_VERSION")) > > > 0536: > > > *** 0537: source_files = add_download_files(d, build_objset) > > > 0538: build_inputs |= source_files > > > 0539: > > > 0540: recipe_spdx_license = add_license_expression( > > > 0541: d, build_objset, d.getVar("LICENSE"), license_data > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > core/meta/lib/oe/spdx30_tasks.py', lineno: 408, function: add_download_files > > > 0404: creationInfo=objset.doc.creationInfo, > > > 0405: name=file_name, > > > 0406: software_primaryPurpose=primary_purpose, > > > 0407: > > > software_downloadLocation=oe.spdx_common.fetch_data_to_uri( > > > *** 0408: fd, fd.name > > > 0409: ), > > > 0410: ) > > > 0411: ) > > > 0412: > > > Exception: AttributeError: 'FetchData' object has no attribute 'name' > > > > > > ERROR: Logfile of failure stored in: /home/lumag/Projects/RPB/build-rpb/tmp- > > > nodistro/work/x86_64-linux/quilt-native/0.68/temp/log.do_create_spdx.3116916 > > > ERROR: Task (/home/lumag/Projects/RPB/build- > > > rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/quilt/quilt- > > > native_0.68.bb:do_create_spdx) failed with exit code '1' > > > > > > Reverting this commit makes the error disappear. > > > > > > > > > > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > > > > index 0618f2f139..bba11ae930 100644 > > > > --- a/meta/lib/oe/spdx30_tasks.py > > > > +++ b/meta/lib/oe/spdx30_tasks.py > > > > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > > > > filenames.sort() > > > > for fn in filenames: > > > > fpath = Path(dirpath) / fn > > > > - if not fpath.is_file() or fpath.is_symlink(): > > > > + if fpath.is_symlink() or not fpath.is_file(): > > > > continue > > > > > > > > relpath = str(fpath.relative_to(image_rootfs)) > > > > > > > > > > -- > > > With best wishes > > > Dmitry > > > > -- > With best wishes > Dmitry
On Fri, Mar 21, 2025 at 01:49:07PM +0000, Marko, Peter wrote: > I believe that you have a problem with: > * commit https://git.openembedded.org/openembedded-core/commit/?id=4859cdf97fd9a260036e148e25f0b78eb393df1e > * commit https://git.openembedded.org/bitbake/commit/?id=2515fbd10824005fa7f34e87706000c079920366 > Using new oe-core without matching bitbake change will lead to unknown attribute name since it was changed from names to name in both commits together. > > I can cleanly build core-image-minimal with spdx3 from latest poky master (which contains matching oe-core and bitbake versions). > Maybe you have reverted whole oe-core update and not just my commit when looking for the breaking change? Most likely I was unfortunate or there was some repo issue. Afre running `repo sync` again, the build succeeds even without a revert. Please excuse me for the noise. > > Peter > > > -----Original Message----- > > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > Sent: Friday, March 21, 2025 14:10 > > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > > Cc: openembedded-core@lists.openembedded.org > > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > > > On Fri, 21 Mar 2025 at 14:58, Marko, Peter <Peter.Marko@siemens.com> wrote: > > > > > > I think there is something else breaking your build. > > > > > > My commit changed function create_rootfs_spdx. > > > That should not influence recipe spdx code... > > > Did you try a build with my commit reverted? > > > > As I wrote, reverting it makes the error disappear. > > > > > > > > Peter > > > > > > > -----Original Message----- > > > > From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > > > Sent: Friday, March 21, 2025 13:38 > > > > To: Marko, Peter (FT D EU SK BFS1) <Peter.Marko@siemens.com> > > > > Cc: openembedded-core@lists.openembedded.org > > > > Subject: Re: [OE-core][PATCH] spdx30: handle links to inaccessible locations > > > > > > > > On Thu, Mar 20, 2025 at 01:15:33PM +0100, Peter Marko wrote: > > > > > From: Peter Marko <peter.marko@siemens.com> > > > > > > > > > > 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. > > > > > > > > > > Signed-off-by: Peter Marko <peter.marko@siemens.com> > > > > > --- > > > > > meta/lib/oe/spdx30_tasks.py | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > This commit breaks building recipes here: > > > > > > > > ERROR: quilt-native-0.68-r0 do_create_spdx: Error executing a python function > > in > > > > exec_func_python() autogenerated: > > > > > > > > The stack trace of python calls that resulted in this exception/failure was: > > > > File: 'exec_func_python() autogenerated', lineno: 2, function: <module> > > > > 0001: > > > > *** 0002:do_create_spdx(d) > > > > 0003: > > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > > core/meta/classes/create-spdx-3.0.bbclass', lineno: 135, function: > > do_create_spdx > > > > 0131: " > > > > 0132: > > > > 0133:python do_create_spdx() { > > > > 0134: import oe.spdx30_tasks > > > > *** 0135: oe.spdx30_tasks.create_spdx(d) > > > > 0136:} > > > > 0137:do_create_spdx[vardeps] += "\ > > > > 0138: SPDX_INCLUDE_BITBAKE_PARENT_BUILD \ > > > > 0139: SPDX_PACKAGE_ADDITIONAL_PURPOSE \ > > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > > core/meta/lib/oe/spdx30_tasks.py', lineno: 537, function: create_spdx > > > > 0533: ) > > > > 0534: > > > > 0535: cpe_ids = oe.cve_check.get_cpe_ids(d.getVar("CVE_PRODUCT"), > > > > d.getVar("CVE_VERSION")) > > > > 0536: > > > > *** 0537: source_files = add_download_files(d, build_objset) > > > > 0538: build_inputs |= source_files > > > > 0539: > > > > 0540: recipe_spdx_license = add_license_expression( > > > > 0541: d, build_objset, d.getVar("LICENSE"), license_data > > > > File: '/home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded- > > > > core/meta/lib/oe/spdx30_tasks.py', lineno: 408, function: add_download_files > > > > 0404: creationInfo=objset.doc.creationInfo, > > > > 0405: name=file_name, > > > > 0406: software_primaryPurpose=primary_purpose, > > > > 0407: > > > > software_downloadLocation=oe.spdx_common.fetch_data_to_uri( > > > > *** 0408: fd, fd.name > > > > 0409: ), > > > > 0410: ) > > > > 0411: ) > > > > 0412: > > > > Exception: AttributeError: 'FetchData' object has no attribute 'name' > > > > > > > > ERROR: Logfile of failure stored in: /home/lumag/Projects/RPB/build-rpb/tmp- > > > > nodistro/work/x86_64-linux/quilt-native/0.68/temp/log.do_create_spdx.3116916 > > > > ERROR: Task (/home/lumag/Projects/RPB/build- > > > > rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/quilt/quilt- > > > > native_0.68.bb:do_create_spdx) failed with exit code '1' > > > > > > > > Reverting this commit makes the error disappear. > > > > > > > > > > > > > > diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py > > > > > index 0618f2f139..bba11ae930 100644 > > > > > --- a/meta/lib/oe/spdx30_tasks.py > > > > > +++ b/meta/lib/oe/spdx30_tasks.py > > > > > @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): > > > > > filenames.sort() > > > > > for fn in filenames: > > > > > fpath = Path(dirpath) / fn > > > > > - if not fpath.is_file() or fpath.is_symlink(): > > > > > + if fpath.is_symlink() or not fpath.is_file(): > > > > > continue > > > > > > > > > > relpath = str(fpath.relative_to(image_rootfs)) > > > > > > > > > > > > > -- > > > > With best wishes > > > > Dmitry > > > > > > > > -- > > With best wishes > > Dmitry
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py index 0618f2f139..bba11ae930 100644 --- a/meta/lib/oe/spdx30_tasks.py +++ b/meta/lib/oe/spdx30_tasks.py @@ -1068,7 +1068,7 @@ def create_rootfs_spdx(d): filenames.sort() for fn in filenames: fpath = Path(dirpath) / fn - if not fpath.is_file() or fpath.is_symlink(): + if fpath.is_symlink() or not fpath.is_file(): continue relpath = str(fpath.relative_to(image_rootfs))