From: unixmania at gmail.com <unixmania@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/pkg-generic.mk: fix generation of package list in reinstall
Date: Thu, 5 Nov 2020 11:04:01 -0300 [thread overview]
Message-ID: <20201105140401.1356161-1-unixmania@gmail.com> (raw)
From: Carlos Santos <unixmania@gmail.com>
Running "make <pkg>-reinstall" always shows a message like these:
comm: /.../build/pkg-x.y.z/.files-list.before: No such file or directory
comm: /.../build/pkg-x.y.z/.files-list-staging.before: No such file or directory
comm: /.../build/pkg-x.y.z/.files-list-host.before: No such file or directory
This happens because pkg_size_after is called in the .stamp_installed
target and removes .files-list$(2).before, so in a second installation
the file is not there anymore. This results in an empty .files-list.txt
file.
Move the pkg_size_{before,after} calls from the .stamp_configured and
.stamp_installed targets to the .stamp_{host,staging,target}_installed
targets, respectively. This ensures that every pkg_size_after call has
an immediately corresponding pkg_size_before call.
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
package/pkg-generic.mk | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 54de03da03..b13ecc5d8e 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -232,9 +232,6 @@ $(BUILD_DIR)/%/.stamp_configured:
@$(call MESSAGE,"Configuring")
$(Q)mkdir -p $(HOST_DIR) $(TARGET_DIR) $(STAGING_DIR) $(BINARIES_DIR)
$(call prepare-per-package-directory,$($(PKG)_FINAL_DEPENDENCIES))
- @$(call pkg_size_before,$(TARGET_DIR))
- @$(call pkg_size_before,$(STAGING_DIR),-staging)
- @$(call pkg_size_before,$(HOST_DIR),-host)
$(call fixup-libtool-files,$(NAME),$(STAGING_DIR))
$(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep))
$($(PKG)_CONFIGURE_CMDS)
@@ -256,9 +253,11 @@ $(BUILD_DIR)/%/.stamp_built::
$(BUILD_DIR)/%/.stamp_host_installed:
@$(call step_start,install-host)
@$(call MESSAGE,"Installing to host directory")
+ @$(call pkg_size_before,$(HOST_DIR),-host)
$(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep))
+$($(PKG)_INSTALL_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep))
+ @$(call pkg_size_after,$(HOST_DIR),-host)
@$(call step_end,install-host)
$(Q)touch $@
@@ -285,6 +284,7 @@ $(BUILD_DIR)/%/.stamp_host_installed:
$(BUILD_DIR)/%/.stamp_staging_installed:
@$(call step_start,install-staging)
@$(call MESSAGE,"Installing to staging directory")
+ @$(call pkg_size_before,$(STAGING_DIR),-staging)
$(foreach hook,$($(PKG)_PRE_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
+$($(PKG)_INSTALL_STAGING_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
@@ -320,6 +320,7 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
mv "$${la}.fixed" "$${la}"; \
fi || exit 1; \
done
+ @$(call pkg_size_after,$(STAGING_DIR),-staging)
@$(call step_end,install-staging)
$(Q)touch $@
@@ -337,6 +338,7 @@ $(BUILD_DIR)/%/.stamp_images_installed:
$(BUILD_DIR)/%/.stamp_target_installed:
@$(call step_start,install-target)
@$(call MESSAGE,"Installing to target")
+ @$(call pkg_size_before,$(TARGET_DIR))
$(foreach hook,$($(PKG)_PRE_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
+$($(PKG)_INSTALL_TARGET_CMDS)
$(if $(BR2_INIT_SYSTEMD),\
@@ -350,15 +352,13 @@ $(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 pkg_size_after,$(TARGET_DIR))
@$(call step_end,install-target)
$(Q)touch $@
# Final installation step, completed when all installation steps
# (host, images, staging, target) have completed
$(BUILD_DIR)/%/.stamp_installed:
- @$(call pkg_size_after,$(TARGET_DIR))
- @$(call pkg_size_after,$(STAGING_DIR),-staging)
- @$(call pkg_size_after,$(HOST_DIR),-host)
@$(call check_bin_arch)
$(Q)touch $@
--
2.27.0
next reply other threads:[~2020-11-05 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 14:04 unixmania at gmail.com [this message]
2020-11-05 16:33 ` [Buildroot] [PATCH] package/pkg-generic.mk: fix generation of package list in reinstall Thomas Petazzoni
2020-11-05 17:21 ` Carlos Santos
2020-11-05 21:16 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105140401.1356161-1-unixmania@gmail.com \
--to=unixmania@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox