diff mbox series

bb: compress: use lz4 instead of lz4c

Message ID 20241104173557.2712213-1-jsbronder@cold-front.org
State New
Headers show
Series bb: compress: use lz4 instead of lz4c | expand

Commit Message

Justin Bronder Nov. 4, 2024, 5:35 p.m. UTC
lz4c has been considered deprecated by upstream since at least 2018 [1]
and has been disabled by default recently [2].  openSUSE Tumbleweed is
no longer packaging the deprecated version and others will likely
follow.

Luckily, we're not using any legacy-specific options and, going back as
far as Ubuntu 16.04/Fedora 25, both lz4 and lz4cli are installed as part
of the same package

1. https://github.com/lz4/lz4/pull/553
2. https://github.com/lz4/lz4/pull/1479

Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
---
 lib/bb/compress/lz4.py      | 4 ++--
 lib/bb/tests/compression.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/compress/lz4.py b/lib/bb/compress/lz4.py
index 88b098932..2a64681c8 100644
--- a/lib/bb/compress/lz4.py
+++ b/lib/bb/compress/lz4.py
@@ -13,7 +13,7 @@  def open(*args, **kwargs):
 
 class LZ4File(bb.compress._pipecompress.PipeFile):
     def get_compress(self):
-        return ["lz4c", "-z", "-c"]
+        return ["lz4", "-z", "-c"]
 
     def get_decompress(self):
-        return ["lz4c", "-d", "-c"]
+        return ["lz4", "-d", "-c"]
diff --git a/lib/bb/tests/compression.py b/lib/bb/tests/compression.py
index 95af3f96d..16c297b31 100644
--- a/lib/bb/tests/compression.py
+++ b/lib/bb/tests/compression.py
@@ -66,8 +66,8 @@  class CompressionTests(object):
 
 class LZ4Tests(CompressionTests, unittest.TestCase):
     def setUp(self):
-        if shutil.which("lz4c") is None:
-            self.skipTest("'lz4c' not found")
+        if shutil.which("lz4") is None:
+            self.skipTest("'lz4' not found")
         super().setUp()
 
     @contextlib.contextmanager