Jelajahi Sumber

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>
Christopher Larson 8 tahun lalu
induk
melakukan
87ec35603d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      scripts/sysroot-relativelinks.py

+ 1 - 1
scripts/sysroot-relativelinks.py

@@ -24,7 +24,7 @@ def handlelink(filep, subdir):
     os.symlink(os.path.relpath(topdir+link, subdir), filep)
     os.symlink(os.path.relpath(topdir+link, subdir), filep)
 
 
 for subdir, dirs, files in os.walk(topdir):
 for subdir, dirs, files in os.walk(topdir):
-    for f in files:
+    for f in dirs + files:
         filep = os.path.join(subdir, f)
         filep = os.path.join(subdir, f)
         if os.path.islink(filep):
         if os.path.islink(filep):
             #print("Considering %s" % filep)
             #print("Considering %s" % filep)