]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
support/scripts/check-bin-arch: ignore symbolic links
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 3 Sep 2017 14:09:41 +0000 (16:09 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 16 Oct 2017 20:59:34 +0000 (22:59 +0200)
commite8e8f43abda1fa736a2b0c544db8e4dc7db29f50
treed36841f60a4662acc85952e79ab9513e84de14f2
parent0cb0c0f4c12f1ee8e94387fcb43fa7316017e895
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:

  http://autobuild.buildroot.net/results/16d384a0183d477646ac7692feb65f00dde7d068/
  (vim)

  http://autobuild.buildroot.net/results/50429c0f63a8befff9e20899327b9a8d754d99be/
  (ifupdown)

  http://autobuild.buildroot.net/results/1db65973e782bfa61abcbccd3501bfd235f77288/
  (gawk)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit c96b8675ea03a5d3194d439f740c725dd239ed1a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/check-bin-arch