[oe] [meta-oe] [PATCH] dos2unix.bbclass: add recipe

liu.ming50 at gmail.com liu.ming50 at gmail.com
Sun Jun 11 12:54:20 UTC 2017


From: Ming Liu <peter.x.liu at external.atlascopco.com>

Class for use to convert all CRLF line terminators to LF provided
that some projects are being developed/maintained on Windows so they
have different line terminators(CRLF) vs on Linux(LF), which can
cause annoying patching errors during git push/checkout processes.

Signed-off-by: Ming Liu <peter.x.liu at external.atlascopco.com>
---
 meta-oe/classes/dos2unix.bbclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta-oe/classes/dos2unix.bbclass

diff --git a/meta-oe/classes/dos2unix.bbclass b/meta-oe/classes/dos2unix.bbclass
new file mode 100644
index 0000000..1bad998
--- /dev/null
+++ b/meta-oe/classes/dos2unix.bbclass
@@ -0,0 +1,14 @@
+# Class for use to convert all CRLF line terminators to LF
+# provided that some projects are being developed/maintained
+# on Windows so they have different line terminators(CRLF) vs
+# 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"
+
+# Convert CRLF line terminators to LF
+do_convert_crlf_to_lf () {
+    find ${S} -type f -exec dos2unix {} \;
+}
+
+addtask convert_crlf_to_lf after do_unpack before do_patch
-- 
2.7.4




More information about the Openembedded-devel mailing list