[oe-commits] [openembedded-core] 37/65: gen-lockedsig-cache: catch os.link error

git at git.openembedded.org git at git.openembedded.org
Wed Mar 22 10:14:11 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 fb9fdd7a74917cdcab039aa3a9a9944b18246fea
Author: brian avery <avery.brian at gmail.com>
AuthorDate: Sun Mar 19 10:32:40 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, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 49de74e..6765891 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)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list