Switch from minigzip to gzip.
Bug: http://b/288169261
Test: treehugger
Change-Id: I404cbcb850734ed8291c2215a4329fb372806d63
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 5d102cd..b791c63 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -985,7 +985,7 @@
each of the variables.
ramdisk_format: If name is "boot", the format of ramdisk inside the
boot image. Otherwise, its value is ignored.
- Use lz4 to decompress by default. If its value is gzip, use minigzip.
+ Use lz4 to decompress by default. If its value is gzip, use gzip.
"""
def __init__(self, input_file, name, placeholder_values=None):
@@ -1637,9 +1637,9 @@
p2 = Run(["lz4", "-l", "-12", "--favor-decSpeed"], stdin=p1.stdout,
stdout=ramdisk_img.file.fileno())
elif ramdisk_format == RamdiskFormat.GZ:
- p2 = Run(["minigzip"], stdin=p1.stdout, stdout=ramdisk_img.file.fileno())
+ p2 = Run(["gzip"], stdin=p1.stdout, stdout=ramdisk_img.file.fileno())
else:
- raise ValueError("Only support lz4 or minigzip ramdisk format.")
+ raise ValueError("Only support lz4 or gzip ramdisk format.")
p2.wait()
p1.wait()
@@ -4064,7 +4064,7 @@
Get build.prop from ramdisk within the boot image
Args:
- boot_img: the boot image file. Ramdisk must be compressed with lz4 or minigzip format.
+ boot_img: the boot image file. Ramdisk must be compressed with lz4 or gzip format.
Return:
An extracted file that stores properties in the boot image.
@@ -4083,11 +4083,11 @@
elif ramdisk_format == RamdiskFormat.GZ:
with open(ramdisk, 'rb') as input_stream:
with open(uncompressed_ramdisk, 'wb') as output_stream:
- p2 = Run(['minigzip', '-d'], stdin=input_stream.fileno(),
+ p2 = Run(['gzip', '-d'], stdin=input_stream.fileno(),
stdout=output_stream.fileno())
p2.wait()
else:
- logger.error('Only support lz4 or minigzip ramdisk format.')
+ logger.error('Only support lz4 or gzip ramdisk format.')
return None
abs_uncompressed_ramdisk = os.path.abspath(uncompressed_ramdisk)