]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: remove redundant cd and mkdir commands
authorAndre McCurdy <armccurdy@gmail.com>
Wed, 15 Jul 2015 00:54:42 +0000 (17:54 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Jul 2015 14:08:46 +0000 (15:08 +0100)
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.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sstate.bbclass

index 5b64b493e93aaa6aad36287a82999ae8737209fe..2a050dc7bcd435ebaa0441d405da15b7b28ae027 100644 (file)
@@ -646,10 +646,9 @@ python sstate_task_postfunc () {
 
 #
 # Shell function to generate a sstate package from a directory
-# set as SSTATE_BUILDDIR
+# set as SSTATE_BUILDDIR. Will be run from within SSTATE_BUILDDIR.
 #
 sstate_create_package () {
-       cd ${SSTATE_BUILDDIR}
        TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
        # Need to handle empty directories
        if [ "$(ls -A)" ]; then
@@ -672,10 +671,9 @@ sstate_create_package () {
 
 #
 # Shell function to decompress and prepare a package for installation
+# Will be run from within SSTATE_INSTDIR.
 #
 sstate_unpack_package () {
-       mkdir -p ${SSTATE_INSTDIR}
-       cd ${SSTATE_INSTDIR}
        tar -xmvzf ${SSTATE_PKG}
        # Use "! -w ||" to return true for read only files
        [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}