From: Mike Crowe Date: Mon, 15 Jul 2019 12:51:00 +0000 (+0100) Subject: rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_test_data X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~13896 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97e1af51814c63963dc6eee003e0cf0e4dead024;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Mike Crowe Signed-off-by: Richard Purdie --- diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index a2fe3dea2b5..6cec23ef1a6 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass @@ -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)