summaryrefslogtreecommitdiffstats
path: root/scripts/sysroot-relativelinks.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2017-03-28 21:14:55 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-29 16:37:27 +0100
commit87ec35603d97019683a015a157f6f1f38db8ac3a (patch)
tree6c8f6bbddff508ee7768c06bd5db41991e2400b8 /scripts/sysroot-relativelinks.py
parent07171aba2bd73bdb04c31b8a487bd28c58580498 (diff)
downloadpoky-87ec35603d97019683a015a157f6f1f38db8ac3a.tar.gz
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. (From OE-Core rev: c5b522378fff13962a5187d9d09979866f805cb5) 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-xscripts/sysroot-relativelinks.py2
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):
24 os.symlink(os.path.relpath(topdir+link, subdir), filep) 24 os.symlink(os.path.relpath(topdir+link, subdir), filep)
25 25
26for subdir, dirs, files in os.walk(topdir): 26for subdir, dirs, files in os.walk(topdir):
27 for f in files: 27 for f in dirs + files:
28 filep = os.path.join(subdir, f) 28 filep = os.path.join(subdir, f)
29 if os.path.islink(filep): 29 if os.path.islink(filep):
30 #print("Considering %s" % filep) 30 #print("Considering %s" % filep)