[oe-commits] [openembedded-core] 50/52: gen-lockedsig-cache: catch os.link error
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 16 22:23:15 UTC 2017
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 088fb0a7d722e3d4c74f167814e82d7e4b874405
Author: brian avery <brian.avery at intel.com>
AuthorDate: Tue Mar 14 17:04:32 2017 -0700
gen-lockedsig-cache: catch os.link error
We do a hard link to speed up sdk creation but if your sstate-cache is
across a file system boundary, this tries and fails. This patch catches
that error and does a copy instead.
Signed-off-by: brian avery <brian.avery at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/gen-lockedsig-cache | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 49de74e..1cfbeae 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -63,6 +63,12 @@ for f in files:
if (os.stat(src).st_dev == os.stat(destdir).st_dev):
print('linking')
os.link(src, dst)
+ try:
+ os.link(src, dst)
+ except Exception:
+ print('hard linking failed, copying')
+ shutil.copyfile(src, dst)
+ os.link(src, dst)
else:
print('copying')
shutil.copyfile(src, dst)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list