diff options
author | brian avery <avery.brian@gmail.com> | 2017-03-19 10:32:40 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-21 22:43:02 +0000 |
commit | fb9fdd7a74917cdcab039aa3a9a9944b18246fea (patch) | |
tree | fd743a04a42f380e192e1e9c75be686d203e6d2b /scripts | |
parent | 9e99897f17d9c62ca5da208751d6560fc98927b6 (diff) | |
download | openembedded-core-fb9fdd7a74917cdcab039aa3a9a9944b18246fea.tar.gz openembedded-core-fb9fdd7a74917cdcab039aa3a9a9944b18246fea.tar.bz2 openembedded-core-fb9fdd7a74917cdcab039aa3a9a9944b18246fea.zip |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-lockedsig-cache | 6 |
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) |