Commit fe167e082cbde1c6d186ecdda531abef610ac2ac switched to requiring
lz4 instead of lz4c which allows us to support distros dropping lz4c.
However, it wasn't only OE that was still using the legacy lz4c, there's
a number of upstreams as well.  For instance, it's only in the 6.13
kernel that CONFIG_KERNEL_LZ4 makes the switch from lz4c to lz4.

So, while this all gets ironed out, simply intercept calls to lz4c and
convert them to use lz4.  This was picked instead of adding lz4c to
HOSTTOOLS_NONFATAL due to concerns about builds becoming
non-deterministic and failing late:
https://lore.kernel.org/openembedded-core/9c3143ebb7f9e17cfbd318ef0e17994aae7264be.ca...@linuxfoundation.org/

Signed-off-by: Justin Bronder <jsbron...@cold-front.org>
---
 scripts/lz4c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100755 scripts/lz4c

diff --git a/scripts/lz4c b/scripts/lz4c
new file mode 100755
index 0000000000..466fc349e0
--- /dev/null
+++ b/scripts/lz4c
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Wrapper to intercept legacy lz4c arguments and convert to lz4.
+args=()
+while [ $# -ne 0 ]; do
+    case ${1} in
+        -c0)
+            args+=(-0)
+            ;;
+        -c1)
+            args+=(-9)
+            ;;
+        -c2|-hc)
+            args+=(-12)
+            ;;
+        -y)
+            args+=(--force)
+            ;;
+        *)
+            args+=("${1}")
+            ;;
+    esac
+    shift
+done
+
+exec lz4 "${args[@]}"
-- 
2.47.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#208791): 
https://lists.openembedded.org/g/openembedded-core/message/208791
Mute This Topic: https://lists.openembedded.org/mt/110151116/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to