diff options
authorThomas Petazzoni <>2017-09-03 14:09:41 (GMT)
committerThomas Petazzoni <>2017-09-04 14:01:51 (GMT)
commitc96b8675ea03a5d3194d439f740c725dd239ed1a (patch)
parent36cbff3ea53030923cd352f42d2e26e7450a512c (diff)
support/scripts/check-bin-arch: ignore symbolic links
Since commit da32b49f0091ee9dfb613e0f00973bf6893bfa84 ("instrumentation: extend packages-file-list.txt with symlinks and directories"), the packages-file-list.txt also contains symbolic links. Therefore, check-bin-arch is now also checking symbolic links. However, symbolic links in $(TARGET_DIR) can have absolute path as targets, such as: $ ls -l output/target/sbin/ifdown lrwxrwxrwx 1 thomas thomas 10 Sep 3 15:55 output/target/sbin/ifdown -> /sbin/ifup Therefore, we are now potentially checking a host binary, which obviously makes check-bin-arch fail. This commit changes check-bin-arch to ignore symbolic links. Indeed, we have two cases: - The symbolic link really points to something that will in the rootfs (such as /sbin/ifup above). In this case, /sbin/ifup will be checked separately by check-bin-arch. - The symbolic link doesn't point to something that will be in the rootfs, and that is not a problem from the perspective of check-bin-arch, which checks the architecture of target binaries. Fixes: (vim) (ifupdown) (gawk) Signed-off-by: Thomas Petazzoni <> Reviewed-by: "Yann E. MORIN" <> Signed-off-by: Thomas Petazzoni <>
1 files changed, 6 insertions, 0 deletions
diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch
index b822cdd..700ee3f 100755
--- a/support/scripts/check-bin-arch
+++ b/support/scripts/check-bin-arch
@@ -36,6 +36,12 @@ while read f; do
+ # Skip symlinks. Some symlinks may have absolute paths as
+ # target, pointing to host binaries while we're building.
+ if [[ -L "${f}" ]]; then
+ continue
+ fi
# Get architecture using readelf. We pipe through 'head -1' so
# that when the file is a static library (.a), we only take
# into account the architecture of the first object file.