diff options
author | Christopher Larson <chris_larson@mentor.com> | 2017-03-28 21:14:55 +0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-28 17:21:02 +0100 |
commit | c5b522378fff13962a5187d9d09979866f805cb5 (patch) | |
tree | 5b087d35bc4c43d9b6c4fc15183fb3f737b8c2da /scripts/sysroot-relativelinks.py | |
parent | 9a23af37ad11a7176248ade88511f34fe6dd97bb (diff) | |
download | openembedded-core-c5b522378fff13962a5187d9d09979866f805cb5.tar.gz openembedded-core-c5b522378fff13962a5187d9d09979866f805cb5.tar.bz2 openembedded-core-c5b522378fff13962a5187d9d09979866f805cb5.zip |
sysroot-relativelinks: also consider links to dirs on the host
Dead symlinks, or symlinks to existing files will show up in 'files' of an
os.walk, but symlinks to existing directories show up in 'dirs', so we need to
consider both.
As one example where this is an issue, the symlink from /usr/lib/ssl/certs was
left pointing to /etc/ssl/certs rather than the relative path when the sdk was
built on hosts where the latter exists.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/sysroot-relativelinks.py')
-rwxr-xr-x | scripts/sysroot-relativelinks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py index e44eba2b11..ffe254728b 100755 --- a/scripts/sysroot-relativelinks.py +++ b/scripts/sysroot-relativelinks.py @@ -24,7 +24,7 @@ def handlelink(filep, subdir): os.symlink(os.path.relpath(topdir+link, subdir), filep) for subdir, dirs, files in os.walk(topdir): - for f in files: + for f in dirs + files: filep = os.path.join(subdir, f) if os.path.islink(filep): #print("Considering %s" % filep) |