summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Crowe <mcrowe@mcrowe.com>2019-07-15 13:51:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-16 13:53:17 +0100
commit2381806f26a8c9184e173f00b5d1ab0ca103ddfc (patch)
tree6db7872105305ac27a502d3036c231d029b15b11
parent3e1938f6d21522569d0aa199cfee51b752222a57 (diff)
downloadpoky-2381806f26a8c9184e173f00b5d1ab0ca103ddfc.tar.gz
rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_test_data
Ensure that we don't create an image test data symlink named ".testdata.json" when IMAGE_LINK_NAME is empty. (From OE-Core rev: 97e1af51814c63963dc6eee003e0cf0e4dead024) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/rootfs-postcommands.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index a2fe3dea2b..6cec23ef1a 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -328,7 +328,7 @@ python write_image_test_data() {
328 searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/") 328 searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
329 export2json(d, testdata_name, searchString=searchString, replaceString="") 329 export2json(d, testdata_name, searchString=searchString, replaceString="")
330 330
331 if os.path.exists(testdata_name): 331 if os.path.exists(testdata_name) and link_name:
332 testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) 332 testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
333 if os.path.lexists(testdata_link): 333 if os.path.lexists(testdata_link):
334 os.remove(testdata_link) 334 os.remove(testdata_link)