From: Peter Seiderer Date: Sat, 23 Apr 2016 19:18:29 +0000 (+0200) Subject: Makefile: fix rootfs overlay with BR2_ROOTFS_MERGED_USR enabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0db34529f48a0ca76a4aadd08c9af57d37366d18;p=buildroot.git 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 Reviewed-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- diff --git a/Makefile b/Makefile index 32bbfc4a8d..9b0ed05b3a 100644 --- a/Makefile +++ b/Makefile @@ -660,7 +660,7 @@ endif @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \ $(call MESSAGE,"Copying overlay $(d)"); \ - rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + rsync -a --ignore-times --keep-dirlinks $(RSYNC_VCS_EXCLUSIONS) \ --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ $(d)/ $(TARGET_DIR)$(sep))