Whilst this doesn't remove all possible issues, removing files in /bin/
directories, then removing support files (like shared libraries) does
reduce the potential for weird failures if the system calls things like
python3.
[YOCTO #16323]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
with open(manifest) as mfile:
entries = mfile.readlines()
with open(manifest) as mfile:
entries = mfile.readlines()
+ # Remove binaries first, then all the other files, just in case somehow something
+ # is trying to execute something in a sysroot (e.g. python3 from PATH).
+ entries.sort(key=lambda d: '/bin/' not in d)
+
for entry in entries:
entry = entry.strip()
if prefix and not entry.startswith("/"):
for entry in entries:
entry = entry.strip()
if prefix and not entry.startswith("/"):