Makefile: fix rootfs overlay with BR2_ROOTFS_MERGED_USR enabled
authorPeter Seiderer <ps.report@gmx.net>
Sat, 23 Apr 2016 19:18:29 +0000 (21:18 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 13 May 2016 20:07:14 +0000 (22:07 +0200)
commit0db34529f48a0ca76a4aadd08c9af57d37366d18
tree2b35ac34c306a7600b85ffeb7acf55a848f46588
parent8389b623528016d83c7e54a59fbecdc02c846836
Makefile: fix rootfs overlay with BR2_ROOTFS_MERGED_USR enabled

Use rsync with '--keep-dirlinks' option to prevent rootfs overlay to
overwrite /usr, /bin, /sbin and /lib links in case BR2_ROOTFS_MERGED_USR
option is enabled.

Steps to reproduce failure:

- enable BR2_ROOTFS_MERGED_USR
- mkdir some_path/rootfs-overlay/lib/firmware/some_file.txt
- enable BR2_ROOTFS_OVERLAY="some_path/rootfs-overlay"
- run 'make'
- 'target/lib' contains only the files from 'some_path/rootfs-overlay/lib' instead
  of the original symlink 'lib -> usr/lib'.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile