On Thu, 2025-01-23 at 16:25 +0800, hongxu via lists.openembedded.org wrote:
> While SPDX_INCLUDE_SOURCES = "1", call do_patch in do_create_spdx failed
> for these recipes inherit dos2unix
> 
> Prepend function do_convert_crlf_to_lf to task do_patch to assure always
> run before do_patch
> 
> Add dos2unix-native to DEPENDS to assure the existence of command dos2unix
> before do_convert_crlf_to_lf is executed in any task
> 
> 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
> 
>  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..edc8c3afb4 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"
> +DEPENDS += "dos2unix-native"

That will break the class for normal do_patch unfortunately, DEPENDS is too 
late.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210180): 
https://lists.openembedded.org/g/openembedded-core/message/210180
Mute This Topic: https://lists.openembedded.org/mt/110768785/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to