While SPDX_INCLUDE_SOURCES = "1", call do_patch in do_create_spdx failed for these recipes inherit dos2unix
Prepend function convert_crlf_to_lf to task do_patch to assure always run before do_patch Add dos2unix-native to PATCHDEPENDENCY to assure the existence of command dos2unix before convert_crlf_to_lf is executed in do_patch - The do_creat_spdx task has added PATCHDEPENDENCY to depends - The do_unpack_and_patch task has added task after do_patch (addtask do_unpack_and_patch after do_patch do_preconfigure) Also remove extra do_convert_crlf_to_lf in archiver.bbclass which is not necessary any more Suggested-by Richard Purdie <[email protected]> Signed-off-by: Hongxu Jia <[email protected]> --- Changed in v2: Do not call bb.build.exec_func to run do_convert_crlf_to_lf in classes/spdx-common, preprend it to task do_patch to assure always run before do_patch Changed in v3: Add dos2unix-native to PATCHDEPENDENCY other than to DEPENDS which is too late for do_patch meta/classes-recipe/dos2unix.bbclass | 8 +++++--- meta/classes/archiver.bbclass | 3 --- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/meta/classes-recipe/dos2unix.bbclass b/meta/classes-recipe/dos2unix.bbclass index 18e89b1cf2..3a094197a2 100644 --- a/meta/classes-recipe/dos2unix.bbclass +++ b/meta/classes-recipe/dos2unix.bbclass @@ -10,11 +10,13 @@ # on Linux(LF), which can cause annoying patching errors during # git push/checkout processes. -do_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot" +PATCHDEPENDENCY += "dos2unix-native:do_populate_sysroot" # Convert CRLF line terminators to LF -do_convert_crlf_to_lf () { +convert_crlf_to_lf () { find ${S} -type f -exec dos2unix {} \; } -addtask convert_crlf_to_lf after do_unpack before do_patch +python do_patch:prepend() { + bb.build.exec_func('convert_crlf_to_lf', d) +} diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index df271feddd..4404f0c032 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -507,9 +507,6 @@ python do_unpack_and_patch() { src_orig = '%s.orig' % src oe.path.copytree(src, src_orig) - if bb.data.inherits_class('dos2unix', d): - bb.build.exec_func('do_convert_crlf_to_lf', d) - # Make sure gcc and kernel sources are patched only once if not (d.getVar('SRC_URI') == "" or is_work_shared(d)): bb.build.exec_func('do_patch', d) -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#210183): https://lists.openembedded.org/g/openembedded-core/message/210183 Mute This Topic: https://lists.openembedded.org/mt/110769014/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
