diff options
author | André Draszik <andre.draszik@jci.com> | 2018-08-20 09:15:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-21 14:49:42 +0100 |
commit | 8f16469e97c86078cf6129e9120dc58447e4cc13 (patch) | |
tree | 95effaf7464ec936397a0910e2ae56870885e932 /meta/classes/rootfs-postcommands.bbclass | |
parent | 09a2975e725d04d4984730642f944e61fba14030 (diff) | |
download | poky-8f16469e97c86078cf6129e9120dc58447e4cc13.tar.gz |
rootfs-postcommands: put image testdata under sstate control
The testdata.json is being written to DEPLOY_DIR_IMAGE directly,
thus bypassing sstate, which results in an ever growing list
of files.
Write them to IMGDEPLOYDIR instead, so as to benefit from the
automatic management via sstate.
(From OE-Core rev: 1f7399a5e5d12b7ca3faf399a70c1613d522c28d)
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index ca690a6e59..e816824f28 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -316,17 +316,18 @@ rootfs_sysroot_relativelinks () { | |||
316 | python write_image_test_data() { | 316 | python write_image_test_data() { |
317 | from oe.data import export2json | 317 | from oe.data import export2json |
318 | 318 | ||
319 | testdata = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_NAME')) | 319 | deploy_dir = d.getVar('IMGDEPLOYDIR') |
320 | testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_LINK_NAME')) | 320 | link_name = d.getVar('IMAGE_LINK_NAME') |
321 | testdata_name = os.path.join(deploy_dir, "%s.testdata.json" % d.getVar('IMAGE_NAME')) | ||
321 | 322 | ||
322 | bb.utils.mkdirhier(os.path.dirname(testdata)) | ||
323 | searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/") | 323 | searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/") |
324 | export2json(d, testdata,searchString=searchString,replaceString="") | 324 | export2json(d, testdata_name, searchString=searchString, replaceString="") |
325 | 325 | ||
326 | if testdata_link != testdata: | 326 | if os.path.exists(testdata_name): |
327 | testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) | ||
327 | if os.path.lexists(testdata_link): | 328 | if os.path.lexists(testdata_link): |
328 | os.remove(testdata_link) | 329 | os.remove(testdata_link) |
329 | os.symlink(os.path.basename(testdata), testdata_link) | 330 | os.symlink(os.path.basename(testdata_name), testdata_link) |
330 | } | 331 | } |
331 | write_image_test_data[vardepsexclude] += "TOPDIR" | 332 | write_image_test_data[vardepsexclude] += "TOPDIR" |
332 | 333 | ||