[Git][reproducible-builds/diffoscope][master] invoke gzip with the short option names to support busybox's gzip.

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Sun Jun 27 14:39:28 UTC 2021



Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
9aefdb65 by Mattia Rizzolo at 2021-06-27T16:39:10+02:00
invoke gzip with the short option names to support busybox's gzip.

Closes: reproducible-builds/diffoscope#268
Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- diffoscope/comparators/gzip.py


Changes:

=====================================
diffoscope/comparators/gzip.py
=====================================
@@ -45,8 +45,11 @@ class GzipContainer(Archive):
         dest_path = self.get_path_name(dest_dir)
         logger.debug("gzip extracting to %s", dest_path)
         with open(dest_path, "wb") as fp:
+            # Use the short options (-d and -c) instead of the long options
+            # (--decompress and --stdout) to support the gzip implementation
+            # present in busybox, which doesn't support the long options.
             subprocess.check_call(
-                ["gzip", "--decompress", "--stdout", self.source.path],
+                ["gzip", "-d", "-c", self.source.path],
                 stdout=fp,
                 stderr=None,
             )



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/9aefdb654df57c4e4c6fdeb37ba135492a64d623

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/9aefdb654df57c4e4c6fdeb37ba135492a64d623
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210627/cf8d4a1f/attachment.htm>


More information about the rb-commits mailing list