]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_test_data
authorMike Crowe <mcrowe@mcrowe.com>
Mon, 15 Jul 2019 12:51:00 +0000 (13:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Jul 2019 11:17:18 +0000 (12:17 +0100)
Ensure that we don't create an image test data symlink named
".testdata.json" when IMAGE_LINK_NAME is empty.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs-postcommands.bbclass

index a2fe3dea2b59cd94615b3f37cc143a455a200186..6cec23ef1a6908252739b51cfedcee803673412e 100644 (file)
@@ -328,7 +328,7 @@ python write_image_test_data() {
     searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
     export2json(d, testdata_name, searchString=searchString, replaceString="")
 
-    if os.path.exists(testdata_name):
+    if os.path.exists(testdata_name) and link_name:
         testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
         if os.path.lexists(testdata_link):
             os.remove(testdata_link)