mirror of
https://git.yoctoproject.org/poky
synced 2026-09-16 09:49:35 +02:00
create-spdx-{2.2,3.0}: fix do_create_spdx dependency while spdx include sources
Call function ${@create_spdx_source_deps(d)} or ${create_spdx_source_deps(d)}
along with addtask not working, use task do_create_spdx flag 'depends'
to instead
Move function create_spdx_source_deps to spdx-common.bbclass for both of
create-spdx-2.2.bbclass and create-spdx-3.0.bbclass
(From OE-Core rev: dda4b7ccd416ef370634babd150e944f2aa9116e)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Reviewed-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
29c65baf76
commit
8f4759806e
@@ -39,6 +39,27 @@ SPDX_CUSTOM_ANNOTATION_VARS ??= ""
|
||||
|
||||
SPDX_MULTILIB_SSTATE_ARCHS ??= "${SSTATE_ARCHS}"
|
||||
|
||||
def create_spdx_source_deps(d):
|
||||
import oe.spdx_common
|
||||
|
||||
deps = []
|
||||
if d.getVar("SPDX_INCLUDE_SOURCES") == "1":
|
||||
pn = d.getVar('PN')
|
||||
# do_unpack is a hack for now; we only need it to get the
|
||||
# dependencies do_unpack already has so we can extract the source
|
||||
# ourselves
|
||||
if oe.spdx_common.has_task(d, "do_unpack"):
|
||||
deps.append("%s:do_unpack" % pn)
|
||||
|
||||
if oe.spdx_common.is_work_shared_spdx(d) and \
|
||||
oe.spdx_common.process_sources(d):
|
||||
# For kernel source code
|
||||
if oe.spdx_common.has_task(d, "do_shared_workdir"):
|
||||
deps.append("%s:do_shared_workdir" % pn)
|
||||
|
||||
return " ".join(deps)
|
||||
|
||||
|
||||
python do_collect_spdx_deps() {
|
||||
# This task calculates the build time dependencies of the recipe, and is
|
||||
# required because while a task can deptask on itself, those dependencies
|
||||
|
||||
Reference in New Issue
Block a user