[oe-commits] [openembedded-core] branch pyro updated: rootfs-postcommands.bbclass: Prevent linking testdata to itself
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 29 11:23:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch pyro
in repository openembedded-core.
The following commit(s) were added to refs/heads/pyro by this push:
new f8ceec5 rootfs-postcommands.bbclass: Prevent linking testdata to itself
f8ceec5 is described below
commit f8ceec50af68650d6548738e5b5582e2b25424d7
Author: Mike Looijmans <mike.looijmans at topic.nl>
AuthorDate: Thu Aug 17 12:49:49 2017 +0200
rootfs-postcommands.bbclass: Prevent linking testdata to itself
testdata and testdata_link may point to the same file, in particular
when IMAGE_LINK_NAME and IMAGE_NAME are equal.
Check if this is the case before creating a symlink that points to
itself and makes the next build fail.
Signed-off-by: Mike Looijmans <mike.looijmans at topic.nl>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/rootfs-postcommands.bbclass | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 498174a..c194b26 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -298,7 +298,8 @@ python write_image_test_data() {
searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
export2json(d, testdata,searchString=searchString,replaceString="")
- if os.path.lexists(testdata_link):
- os.remove(testdata_link)
- os.symlink(os.path.basename(testdata), testdata_link)
+ if testdata_link != testdata:
+ if os.path.lexists(testdata_link):
+ os.remove(testdata_link)
+ os.symlink(os.path.basename(testdata), testdata_link)
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list