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

Alejandro Del Castillo alejandro.delcastillo at ni.com
Fri Oct 5 13:31:07 PDT 2018


Hi Mike,

Thanks for the patch! Just merged it into master (I updated the man page 
to reflect the new option)


On 10/4/18 11:53 AM, Mike Crowe wrote:
> 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=
> 

-- 
Cheers,

Alejandro


More information about the yocto mailing list