diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-08-11 16:44:58 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:32:01 +0100 |
commit | d65a6ee9e7a9c63b9a16bdb5025af8a7c6433c4f (patch) | |
tree | 0f60f3dc47399b32bdef1d61b12e5e6d9c802e86 /scripts | |
parent | 5a1efa91a418e3206b047564d0fd6d5bac22a8d3 (diff) | |
download | openembedded-core-d65a6ee9e7a9c63b9a16bdb5025af8a7c6433c4f.tar.gz openembedded-core-d65a6ee9e7a9c63b9a16bdb5025af8a7c6433c4f.tar.bz2 openembedded-core-d65a6ee9e7a9c63b9a16bdb5025af8a7c6433c4f.zip |
gen-lockedsig-cache: ensure symlinks are dereferenced
If you set up a local mirror in SSTATE_MIRRORS then you can end up with
symlinks in SSTATE_DIR rather than real files. We don't want these
symlinks in the sstate-cache prodcued by gen-lockedsig-cache, so
dereference any symlinks before copying.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-lockedsig-cache | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache index de8a20c787..49de74ed9b 100755 --- a/scripts/gen-lockedsig-cache +++ b/scripts/gen-lockedsig-cache @@ -57,13 +57,14 @@ for f in files: destdir = os.path.dirname(dst) mkdir(destdir) + src = os.path.realpath(f) if os.path.exists(dst): os.remove(dst) - if (os.stat(f).st_dev == os.stat(destdir).st_dev): + if (os.stat(src).st_dev == os.stat(destdir).st_dev): print('linking') - os.link(f, dst) + os.link(src, dst) else: print('copying') - shutil.copyfile(f, dst) + shutil.copyfile(src, dst) print('Done!') |