Pārlūkot izejas kodu

support/download/helpers: use tar xzf in post_process_unpack()

For now, the download post-process logic uses mk_tar_gz, which repacks
a tarball compressed with gzip. So we can only accept as input a
tarball also compressed with gzip. To enforce that, this commit
changes post_process_unpack() to use tar xzf. This makes sure that if
a tarball compressed with something else than gzip gets used, it will
bail out and we will notice.

Support for other compression schemes can be added later on.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Thomas Petazzoni 3 gadi atpakaļ
vecāks
revīzija
8ccff780f4
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      support/download/helpers

+ 1 - 1
support/download/helpers

@@ -78,7 +78,7 @@ post_process_unpack() {
     local one_file
 
     mkdir "${dest}"
-    tar -C "${dest}" --strip-components=1 -xf "${tarball}"
+    tar -C "${dest}" --strip-components=1 -xzf "${tarball}"
     one_file="$(find "${dest}" -type f -print0 |LC_ALL=C sort -z |head -z -n1 |tr -d "\0")"
     touch -r "${one_file}" "${dest}.timestamp"
 }