]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Ensure target sstate directory exists if unihash changes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Dec 2019 10:08:58 +0000 (10:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Dec 2019 10:09:03 +0000 (10:09 +0000)
The previous patches meant the mkdir might no longer match the final target
directory. Fix this.

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

index a46dd2e21038d4705a05d7b8544c9a8cf4dba691..79ae392116c47442759782640546d42cea67d0a8 100644 (file)
@@ -613,10 +613,8 @@ def sstate_package(ss, d):
 
     sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['task'])
     d.appendVar('SSTATE_PKG', '_'+ ss['task'] + ".tgz")
-    sstatepkg = d.getVar('SSTATE_PKG')
     bb.utils.remove(sstatebuild, recurse=True)
     bb.utils.mkdirhier(sstatebuild)
-    bb.utils.mkdirhier(os.path.dirname(sstatepkg))
     for state in ss['dirs']:
         if not os.path.exists(state[1]):
             continue
@@ -756,6 +754,8 @@ sstate_create_package () {
                return
        fi
 
+        mkdir -p `dirname ${SSTATE_PKG}`
+
         # Use pigz if available
         OPT="-czS"
         if [ -x "$(command -v pigz)" ]; then