]> code.ossystems Code Review - openembedded-core.git/commitdiff
archiver.bbclass: Fix patch error for recipes that inherit dos2unix.
authorleimaohui <leimaohui@fujitsu.com>
Wed, 21 Jul 2021 10:13:50 +0000 (18:13 +0800)
committerSteve Sakoman <steve@sakoman.com>
Wed, 4 Aug 2021 19:57:23 +0000 (09:57 -1000)
do_unpack_and_patch error happens for these recipes inherit dos2unix.

Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2ceda7c90c0087f52693c54d5ccab143b27f4d21)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/archiver.bbclass

index 7ca35a573b7fd90dba9c8a5d5088c9b35cbe424e..49717d4f5745989bf3fa554e140caba736f01539 100644 (file)
@@ -484,6 +484,9 @@ 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)