aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian avery <avery.brian@gmail.com>2017-03-19 10:32:40 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 22:43:02 +0000
commitfb9fdd7a74917cdcab039aa3a9a9944b18246fea (patch)
treefd743a04a42f380e192e1e9c75be686d203e6d2b
parent9e99897f17d9c62ca5da208751d6560fc98927b6 (diff)
downloadopenembedded-core-contrib-fb9fdd7a74917cdcab039aa3a9a9944b18246fea.tar.gz
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@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/gen-lockedsig-cache6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 49de74ed9b..6765891d19 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -62,7 +62,11 @@ for f in files:
os.remove(dst)
if (os.stat(src).st_dev == os.stat(destdir).st_dev):
print('linking')
- os.link(src, dst)
+ try:
+ os.link(src, dst)
+ except OSError as e:
+ print('hard linking failed, copying')
+ shutil.copyfile(src, dst)
else:
print('copying')
shutil.copyfile(src, dst)