summaryrefslogtreecommitdiff
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:08:46 +0100
commitfd2d50d46e38d86829f88b5884a6fde6c38f155e (patch)
treeae92277a494b3dc7c3dcf355a3ee3f3bc361a655 /meta/classes/sstate.bbclass
parentb6a66026ef547eb34c6019d2ac7da90b90741dad (diff)
downloadopenembedded-core-fd2d50d46e38d86829f88b5884a6fde6c38f155e.tar.gz
openembedded-core-fd2d50d46e38d86829f88b5884a6fde6c38f155e.tar.bz2
openembedded-core-fd2d50d46e38d86829f88b5884a6fde6c38f155e.zip
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. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 () {
#
# 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}