[yocto] [opkg-utils PATCH] opkg-build: Add support for explicit pigz

Mike Crowe mac at mcrowe.com
Thu Oct 4 09:53:30 PDT 2018


From: Mike Crowe <mcrowe at brightsign.biz>

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 <mac at mcrowe.com>
---
 opkg-build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/opkg-build b/opkg-build
index 0050c2b..d5f5b8f 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=
-- 
2.11.0



More information about the yocto mailing list