[Buildroot] [PATCH v3 10/16] Makefile: breaks hardlinks in global {TARGET, HOST}_DIR on per-package build

Peter Korsgaard peter at korsgaard.com
Sun Oct 1 12:56:19 UTC 2023


On 17/08/2021 10.39, Herve Codina wrote:

Hi,

Sorry, very old patch.


> Without this patch, a make <pkg>_rebuild detects overwrites. Indeed, in
> target_finalize steps some modifications are done on installed files (ie
> strip or TARGET_FINALIZE_HOOKS for instance).
> 
> In order to avoid these modifications seen from per-package {TARGET,HOST}_DIR
> and so been analyzed as some overwrites, global {TARGET,HOST}_DIR is built
> using a full copy of the involved per-package files instead of hardlinks.
> 
> Signed-off-by: Herve Codina <herve.codina at bootlin.com>
> Reviewed-by: Yann E. MORIN <yann.morin.1998 at free.fr>
> ---
> Changes v1 to v2:
>   - Added 'Reviewed-by: Yann E. MORIN'

We have similar issues if you have a post-build script making changes 
with sed or similar, so committed to master after fixing it up (the 
logic was in the mean time moved to package/pkg-utils.mk), thanks.


> 
> Changes v2 to v2:
> None
> 
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 32fad004fe..ccf2020565 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -734,7 +734,7 @@ ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>   define per-package-rsync-delta
>   	$(Q)mkdir -p $(3)
>   	$(foreach pkg,$(1),\
> -		$(Q)rsync -a --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(strip $(2))/ \
> +		$(Q)rsync -a \
>   			--filter='merge $($(call UPPERCASE,$(pkg))_DIR)/$(strip $(4))' \
>   			$(PER_PACKAGE_DIR)/$(pkg)/$(strip $(2))/ \
>   			$(3)$(sep))

-- 
Bye, Peter Korsgaard




More information about the buildroot mailing list