[Buildroot] [RESEND PATCH 6/8] package/pkg-generic: Purge files that should not be installed by INSTALL_CMDS
Arnout Vandecappelle
arnout at rnout.be
Mon May 18 19:37:58 UTC 2026
On 10/05/2026 21:38, John Ernberg wrote:
> Packages such as mutt, bash and gdb are either generating their tar-balls
> incorrectly, or break automake with custom directives, in such a way that
> AM_UPDATE_INFO_DIR=no doesn't work to avoid updating the
> /usr/share/info/dir file.
>
> Add a post-install hook to both staging and target to delete files that are
> needlessly generated and conflict with other packages post-install when
> building with PPD enabled.
>
> Since the currently listed file is documentation related, which ends up
> deleted anyway, there is no TARGET_FINALIZE hook provided to generate the
> file at a later point.
>
> The post-install hook is added at the global level for easier extension and
> also cover non-automake based packages that could be similarly broken.
Isn't this already done by remove-conflicting-useless-files? If that doesn't
work, please try to fix it rather than adding yet another mechanism.
(Marked as Changes Requested in patchwork.)
Regards,
Arnout
>
> Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> Signed-off-by: John Ernberg <j at j-ernberg.se>
> ---
>
> RESEND:
> - Forgot to subscribe this e-mail to the list
>
> package/pkg-generic.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index dd440e4062..1675b1263d 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -343,6 +343,10 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
> mv "$${la}.fixed" "$${la}"; \
> fi || exit 1; \
> done
> + @$(call MESSAGE,"Purging unwanted staging files")
> + @$(if $(BR2_PER_PACKAGE_DIRECTORIES), \
> + rm -f $(STAGING_DIR)/usr/share/info/dir \
> + )
> @$(call step_end,install-staging)
> $(Q)touch $@
>
> @@ -373,6 +377,10 @@ $(BUILD_DIR)/%/.stamp_target_installed:
> $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
> $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \
> fi
> + @$(call MESSAGE,"Purging unwanted target files")
> + @$(if $(BR2_PER_PACKAGE_DIRECTORIES),\
> + rm -f $(TARGET_DIR)/usr/share/info/dir \
> + )
> @$(call step_end,install-target)
> $(Q)touch $@
>
More information about the buildroot
mailing list