]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
spdx30: Improve os.walk() handling
authorJoshua Watt <JPEWhacker@gmail.com>
Thu, 13 Feb 2025 17:18:17 +0000 (10:18 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2025 22:04:00 +0000 (22:04 +0000)
commit86b581e80637cd8136ce7a7e95db94d9553d2f60
tree3b414b94e63cf2b367f1325843c9fb1859bbe90b
parent4ebe72477484cf68165b6f736ce10373e97d0e6d
spdx30: Improve os.walk() handling

There have been errors seen when assembling root file system SPDX
documents where they will references files that don't exist in the
package SPDX.

The speculation is that this is caused by os.walk() ignoring errors when
walking, causing files to be omitted. Improve the code by adding an
error handler to os.walk() to report errors when they occur.

In addition, sort the files and directories while walking to ensure
consistent ordering of the file SPDX IDs.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/spdx30_tasks.py