[oe-commits] [openembedded-core] 01/17: rootfs-postcommands: put image testdata under sstate control
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 21 08:15:58 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit bab4fafef2cc5bd9dee7309b8e8f6be177facc14
Author: André Draszik <andre.draszik at jci.com>
AuthorDate: Mon Aug 20 09:15:09 2018 +0100
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.
Signed-off-by: André Draszik <andre.draszik at jci.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/rootfs-postcommands.bbclass | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index ca690a6..e816824 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -316,17 +316,18 @@ rootfs_sysroot_relativelinks () {
python write_image_test_data() {
from oe.data import export2json
- testdata = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_NAME'))
- testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_LINK_NAME'))
+ deploy_dir = d.getVar('IMGDEPLOYDIR')
+ link_name = d.getVar('IMAGE_LINK_NAME')
+ testdata_name = os.path.join(deploy_dir, "%s.testdata.json" % d.getVar('IMAGE_NAME'))
- bb.utils.mkdirhier(os.path.dirname(testdata))
searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
- export2json(d, testdata,searchString=searchString,replaceString="")
+ export2json(d, testdata_name, searchString=searchString, replaceString="")
- if testdata_link != testdata:
+ if os.path.exists(testdata_name):
+ testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
if os.path.lexists(testdata_link):
- os.remove(testdata_link)
- os.symlink(os.path.basename(testdata), testdata_link)
+ os.remove(testdata_link)
+ os.symlink(os.path.basename(testdata_name), testdata_link)
}
write_image_test_data[vardepsexclude] += "TOPDIR"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list