]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Ensure mkdir happens before mktemp
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Dec 2019 11:59:14 +0000 (11:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Dec 2019 11:59:16 +0000 (11:59 +0000)
This avoids a directory not present error.

Fix a comment typo whilst here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 79ae392116c47442759782640546d42cea67d0a8..b5267f00be6595be93a0bec0a1ecbfb6276df2a8 100644 (file)
@@ -747,14 +747,13 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
 # set as SSTATE_BUILDDIR. Will be run from within SSTATE_BUILDDIR.
 #
 sstate_create_package () {
-       TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
-
-       # Exit earlu if it already exists
+       # Exit early if it already exists
        if [ -e ${SSTATE_PKG} ]; then
                return
        fi
 
         mkdir -p `dirname ${SSTATE_PKG}`
+       TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
 
         # Use pigz if available
         OPT="-czS"