blob: dd433e8eb9a60244a2fa73e353f4b419d10208ca [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From ab1436927b47badcd219a5f075dfc848020e061d Mon Sep 17 00:00:00 2001
2From: Mike Crowe <mac@mcrowe.com>
3Date: Thu, 4 Oct 2018 17:54:19 +0100
4Subject: [opkg-utils PATCH] opkg-build: Add support for explicit use of pigz
5To: opkg-devel@googlegroups.com,
6 yocto@yoctoproject.org
7
8oe-core has stopped[1] installing pigz as gzip. This means that in
9order to persuade opkg-build to use pigz it must be specified
10explicitly. Let's teach opkg-build to deal with being passed pigz as a
11compressor.
12
13We can't combine the check for whether -T is required with the one for
14gzip because opkg-build needs to call $compressor and gzip separately
15to construct the package.
16
17[1] http://lists.openembedded.org/pipermail/openembedded-commits/2018-February/218767.html
18
19Upstream-Status: Submitted [opkg-devel@googlegroups.com https://groups.google.com/forum/#!topic/opkg-devel/E0WVOhjK61w]
20Signed-off-by: Mike Crowe <mac@mcrowe.com>
21---
22 opkg-build | 6 +++++-
23 1 file changed, 5 insertions(+), 1 deletion(-)
24
25diff --git a/opkg-build b/opkg-build
26index 93a7956..f8403ea 100755
27--- a/opkg-build
28+++ b/opkg-build
29@@ -170,7 +170,7 @@ fi
30
31 compressor_ext() {
32 case $1 in
33- gzip)
34+ gzip|pigz)
35 echo gz
36 ;;
37 bzip2)
38@@ -232,6 +232,10 @@ if [ $compressor = "gzip" ] ; then
39 compressorargs=$zipargs
40 elif [ $compressor = "xz" ] ; then
41 compressorargs="--threads 0"
42+elif [ $compressor = "pigz" ] ; then
43+ if $compressor --help 2>&1 | grep -- "-T" > /dev/null; then
44+ compressorargs="-9nT"
45+ fi
46 fi
47
48 tsortargs=
49--
502.11.0
51