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>
This commit is contained in:
Andre McCurdy
2015-07-14 17:54:42 -07:00
committed by Richard Purdie
parent 4d77270c2d
commit 7e7e1239d5

View 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}