summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 5a0722567a..350d3107f5 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -715,17 +715,24 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
715# 715#
716sstate_create_package () { 716sstate_create_package () {
717 TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX` 717 TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
718
719 # Use pigz if available
720 OPT="-cz"
721 if [ -x "$(command -v pigz)" ]; then
722 OPT="-I pigz -c"
723 fi
724
718 # Need to handle empty directories 725 # Need to handle empty directories
719 if [ "$(ls -A)" ]; then 726 if [ "$(ls -A)" ]; then
720 set +e 727 set +e
721 tar -czf $TFILE * 728 tar $OPT -f $TFILE *
722 ret=$? 729 ret=$?
723 if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then 730 if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then
724 exit 1 731 exit 1
725 fi 732 fi
726 set -e 733 set -e
727 else 734 else
728 tar -cz --file=$TFILE --files-from=/dev/null 735 tar $OPT --file=$TFILE --files-from=/dev/null
729 fi 736 fi
730 chmod 0664 $TFILE 737 chmod 0664 $TFILE
731 mv -f $TFILE ${SSTATE_PKG} 738 mv -f $TFILE ${SSTATE_PKG}