Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] classes/spdx-common: Fix patch error for recipes that inherit dos2unix.
@ 2025-01-22  4:42 Hongxu Jia
  2025-01-22 13:26 ` [OE-core] " Richard Purdie
  2025-01-23  8:25 ` [PATCH v2] dos2unix.bbclass: " Hongxu Jia
  0 siblings, 2 replies; 8+ messages in thread
From: Hongxu Jia @ 2025-01-22  4:42 UTC (permalink / raw)
  To: openembedded-core

While SPDX_INCLUDE_SOURCES = "1", do_create_spdx error happens for
these recipes inherit dos2unix

Refer [1] to fix the issue

[1] https://git.openembedded.org/openembedded-core/commit/?id=2ceda7c90c0087f52693c54d5ccab143b27f4d21

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/lib/oe/spdx_common.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oe/spdx_common.py b/meta/lib/oe/spdx_common.py
index ff18d91780..23a17271d6 100644
--- a/meta/lib/oe/spdx_common.py
+++ b/meta/lib/oe/spdx_common.py
@@ -187,6 +187,8 @@ def get_patched_src(d):
             bb.build.exec_func("do_unpack", d)
 
             if d.getVar("SRC_URI") != "":
+                if bb.data.inherits_class('dos2unix', d):
+                    bb.build.exec_func('do_convert_crlf_to_lf', d)
                 bb.build.exec_func("do_patch", d)
 
         # Copy source from work-share to spdx_workdir
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-23  8:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22  4:42 [PATCH] classes/spdx-common: Fix patch error for recipes that inherit dos2unix Hongxu Jia
2025-01-22 13:26 ` [OE-core] " Richard Purdie
2025-01-23  8:03   ` hongxu
2025-01-23  8:18     ` [OE-core] " Richard Purdie
     [not found]     ` <181D447E5FAF7FB4.25327@lists.openembedded.org>
2025-01-23  8:38       ` Richard Purdie
2025-01-23  8:56         ` hongxu
2025-01-23  8:25 ` [PATCH v2] dos2unix.bbclass: " Hongxu Jia
2025-01-23  8:38   ` [OE-core] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox