From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] Makefile: assemble package file lists before calling post-build scripts
Date: Wed, 18 Mar 2020 16:58:13 +0100 [thread overview]
Message-ID: <20200318155814.567-3-patrickdepinguin@gmail.com> (raw)
In-Reply-To: <20200318155814.567-1-patrickdepinguin@gmail.com>
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Post-build scripts may want to do something based on the list of files
installed by a package. However, since commit
0e2be4db8ab01d479177a3a187c22525752195ae the final packages-file-lists.txt
file is only created _after_ the post-build scripts.
Move the assembly of the file lists upwards, before the post-build scripts.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 29d30a4f70..1280066bab 100644
--- a/Makefile
+++ b/Makefile
@@ -806,12 +806,6 @@ endif # merged /usr
$(call MESSAGE,"Copying overlay $(d)"); \
$(call SYSTEM_RSYNC,$(d),$(TARGET_DIR))$(sep))
- @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
- $(call MESSAGE,"Executing post-build script $(s)"); \
- $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
-
- touch $(TARGET_DIR)/usr
-
$(if $(TARGET_DIR_FILES_LISTS), \
cat $(TARGET_DIR_FILES_LISTS) > $(BUILD_DIR)/packages-file-list.txt)
$(if $(HOST_DIR_FILES_LISTS), \
@@ -819,6 +813,12 @@ endif # merged /usr
$(if $(STAGING_DIR_FILES_LISTS), \
cat $(STAGING_DIR_FILES_LISTS) > $(BUILD_DIR)/packages-file-list-staging.txt)
+ @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
+ $(call MESSAGE,"Executing post-build script $(s)"); \
+ $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
+
+ touch $(TARGET_DIR)/usr
+
.PHONY: target-post-image
target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
@rm -f $(ROOTFS_COMMON_TAR)
--
2.24.1
next prev parent reply other threads:[~2020-03-18 15:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 15:58 [Buildroot] [PATCH 1/3] Makefile: don't hang the build if there are no file lists Thomas De Schampheleire
2020-03-18 15:58 ` [Buildroot] [PATCH 2/3] Makefile: fix package file list if FOO_SUBDIR is set Thomas De Schampheleire
2020-03-28 7:39 ` Peter Korsgaard
2020-03-28 8:58 ` Thomas De Schampheleire
2020-03-28 11:06 ` Peter Korsgaard
2020-03-18 15:58 ` Thomas De Schampheleire [this message]
2020-03-28 7:39 ` [Buildroot] [PATCH 3/3] Makefile: assemble package file lists before calling post-build scripts Peter Korsgaard
2020-03-18 21:49 ` [Buildroot] [PATCH 1/3] Makefile: don't hang the build if there are no file lists Yann E. MORIN
2020-03-20 21:10 ` Thomas Petazzoni
2020-03-20 21:29 ` Yann E. MORIN
2020-03-28 7:37 ` Peter Korsgaard
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=20200318155814.567-3-patrickdepinguin@gmail.com \
--to=patrickdepinguin@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