summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2015-07-14 17:54:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-16 15:09:25 +0100
commit7e7e1239d544ff3297b46be8521ecad35d55c996 (patch)
tree62e91a92b4b44940a3c70869f583edf926ee031f /meta/classes/sstate.bbclass
parent4d77270c2d5c06bcd7701c0ed351697a25f95e86 (diff)
downloadpoky-7e7e1239d544ff3297b46be8521ecad35d55c996.tar.gz
sstate.bbclass: remove redundant cd and mkdir commands
Update sstate_create_package and sstate_unpack_package to remove redundant initial mkdir and cd commands. The working directory is now setup correctly before the shell functions are called. (From OE-Core rev: fd2d50d46e38d86829f88b5884a6fde6c38f155e) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 5b64b493e9..2a050dc7bc 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -646,10 +646,9 @@ python sstate_task_postfunc () {
646 646
647# 647#
648# Shell function to generate a sstate package from a directory 648# Shell function to generate a sstate package from a directory
649# set as SSTATE_BUILDDIR 649# set as SSTATE_BUILDDIR. Will be run from within SSTATE_BUILDDIR.
650# 650#
651sstate_create_package () { 651sstate_create_package () {
652 cd ${SSTATE_BUILDDIR}
653 TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX` 652 TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
654 # Need to handle empty directories 653 # Need to handle empty directories
655 if [ "$(ls -A)" ]; then 654 if [ "$(ls -A)" ]; then
@@ -672,10 +671,9 @@ sstate_create_package () {
672 671
673# 672#
674# Shell function to decompress and prepare a package for installation 673# Shell function to decompress and prepare a package for installation
674# Will be run from within SSTATE_INSTDIR.
675# 675#
676sstate_unpack_package () { 676sstate_unpack_package () {
677 mkdir -p ${SSTATE_INSTDIR}
678 cd ${SSTATE_INSTDIR}
679 tar -xmvzf ${SSTATE_PKG} 677 tar -xmvzf ${SSTATE_PKG}
680 # Use "! -w ||" to return true for read only files 678 # Use "! -w ||" to return true for read only files
681 [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG} 679 [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}