From a1ff6a8488b272fa1e82ea0fb33692134957df3e Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Thu, 4 Oct 2018 17:53:30 +0100 Subject: [PATCH] opkg-build: Add support for explicit pigz oe-core has stopped[1] installing pigz as gzip. This means that in order to persuade opkg-build to use pigz it must be specified explicitly. Let's teach opkg-build to deal with being passed pigz as a compressor. We can't combine the check for whether -T is required because opkg-build calls both $compressor and gzip explicitly. Signed-off-by: Mike Crowe Signed-off-by: Alejandro del Castillo --- opkg-build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opkg-build b/opkg-build index 0050c2b..937f2f3 100755 --- a/opkg-build +++ b/opkg-build @@ -170,7 +170,7 @@ fi compressor_ext() { case $1 in - gzip) + gzip|pigz) echo gz ;; bzip2) @@ -230,6 +230,10 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then fi if [ $compressor = "gzip" ] ; then compressorargs=$zipargs +elif [ $compressor = "pigz" ] ; then + if $compressor --help 2>&1 | grep -- "-T" > /dev/null; then + compressorargs="-9nT" + fi fi tsortargs= @@ -337,7 +341,7 @@ Stop with an error if any files ending with B<~> are found. The default behaviou =item B<-Z> I -Specify which compression type to use when building a package. Allowed values are B, B and B (default is B). +Specify which compression type to use when building a package. Allowed values are B, B, B and B (default is B). =item B<-O>