diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2022-07-15 08:47:47 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-19 10:54:20 +0100 |
commit | f414763fa0fbbf38e0bd6dc61bea536576edded8 (patch) | |
tree | 14ad41c97ef5cce8a06f4b9260d2b884788752eb /meta/lib | |
parent | 2ebe1001840fc28d63d5a469ccb9f3476bffd466 (diff) | |
download | poky-f414763fa0fbbf38e0bd6dc61bea536576edded8.tar.gz |
sstatesig: Include all dependencies in SPDX task signatures
SDPX generation involves looking through BB_TASKDEPDATA for
dependencies, then linking to the generated documents for those
dependencies. These document links use a checksum to validate the
document, which means that if a upstream document changes, all
downstream documents must be regenerated to get the new checksum,
otherwise the compendium of documents produced by the build will have
broken links; therefore all dependent task should be included in the
signature (even from "ABI safe" recipes).
(From OE-Core rev: 5fe543b9ceec971cf0297ff0ae3b0ccc4703cece)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/sstatesig.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 7150bd0929..de65244932 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -24,10 +24,19 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches): | |||
24 | return "/allarch.bbclass" in inherits | 24 | return "/allarch.bbclass" in inherits |
25 | def isImage(mc, fn): | 25 | def isImage(mc, fn): |
26 | return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn]) | 26 | return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn]) |
27 | def isSPDXTask(task): | ||
28 | return task in ("do_create_spdx", "do_create_runtime_spdx") | ||
27 | 29 | ||
28 | depmc, _, deptaskname, depmcfn = bb.runqueue.split_tid_mcfn(dep) | 30 | depmc, _, deptaskname, depmcfn = bb.runqueue.split_tid_mcfn(dep) |
29 | mc, _ = bb.runqueue.split_mc(fn) | 31 | mc, _ = bb.runqueue.split_mc(fn) |
30 | 32 | ||
33 | # Keep all dependencies between SPDX tasks in the signature. SPDX documents | ||
34 | # are linked together by hashes, which means if a dependent document changes, | ||
35 | # all downstream documents must be re-written (even if they are "safe" | ||
36 | # dependencies). | ||
37 | if isSPDXTask(task) and isSPDXTask(deptaskname): | ||
38 | return True | ||
39 | |||
31 | # (Almost) always include our own inter-task dependencies (unless it comes | 40 | # (Almost) always include our own inter-task dependencies (unless it comes |
32 | # from a mcdepends). The exception is the special | 41 | # from a mcdepends). The exception is the special |
33 | # do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass. | 42 | # do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass. |