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-22 11:35:21 +0000 |
commit | ab34d087727cc393fe276bfca64a2a6afd80eed2 (patch) | |
tree | 4289f75ea09b9c0d62c91dc663e46c180697f8db /scripts/gen-lockedsig-cache | |
parent | 4ad1148e68a75d9fbaa0ec353bf9b0a20482ab99 (diff) | |
download | poky-ab34d087727cc393fe276bfca64a2a6afd80eed2.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.
(From OE-Core rev: fb9fdd7a74917cdcab039aa3a9a9944b18246fea)
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/gen-lockedsig-cache')
-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: | |||
62 | os.remove(dst) | 62 | os.remove(dst) |
63 | if (os.stat(src).st_dev == os.stat(destdir).st_dev): | 63 | if (os.stat(src).st_dev == os.stat(destdir).st_dev): |
64 | print('linking') | 64 | print('linking') |
65 | os.link(src, dst) | 65 | try: |
66 | os.link(src, dst) | ||
67 | except OSError as e: | ||
68 | print('hard linking failed, copying') | ||
69 | shutil.copyfile(src, dst) | ||
66 | else: | 70 | else: |
67 | print('copying') | 71 | print('copying') |
68 | shutil.copyfile(src, dst) | 72 | shutil.copyfile(src, dst) |