diff mbox series

[[PATCH,RESEND] ] create-spdx: fix config build by adding dependency to enable reruns

Message ID 1677803743-13273-1-git-send-email-maanyagoenka@microsoft.com
State Accepted, archived
Commit 1a0dac4f45c489d107d9627d3c3ab7ccf1c60920
Headers show
Series [[PATCH,RESEND] ] create-spdx: fix config build by adding dependency to enable reruns | expand

Commit Message

maanyagoenka@microsoft.com March 3, 2023, 12:35 a.m. UTC
From: Maanya Goenka <maanyagoenka@linux.microsoft.com>

The issue encountered is about local stos builds failing (when these builds are
preceded by a local SoC OS or MOS build). Essentially, the failure is seen when
building two different configs with shared state, one where gcc-cross-<arch> has a dependency
and one where it doesn't (specifically, one where the abicheck class in meta-binaryaudit
is inherited and one where it isn't). Hence, the task signatures change but a rerun of those said tasks
does not occur. The result is that when the config with the dependency is built and then the one without
is built, due to incorrect dependencies, the SPDX manifest creation stage errors out.

create-spdx relies on BB_TASKDEPDATA to get dependencies and then adds that variable to
vardepsexclude. A change in dependencies therefore, does not result in a
re-execution of the tasks. This commit adds an explicit dependency on DEPENDS which influences
BB_TASKDEPDATA and triggers reruns for new config builds having different dependencies.

Signed-off-by: Maanya Goenka <maanyagoenka@microsoft.com>
Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
 meta/classes/create-spdx-2.2.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index 454dd7a..13d13fe 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -381,7 +381,7 @@  def collect_dep_recipes(d, doc, spdx_recipe):
     return dep_recipes
 collect_dep_recipes[vardepsexclude] += "BB_TASKDEPDATA"
+collect_dep_recipes[vardeps] += "DEPENDS"
 def collect_dep_sources(d, dep_recipes):
     import oe.sbom