Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] fs: prepare temp directory before running PRE_GEN hooks
@ 2017-12-02 11:55 Yann E. MORIN
  2017-12-02 13:41 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2017-12-02 11:55 UTC (permalink / raw)
  To: buildroot

Some filesystems have PRE_GEN hooks that create a directory structure
under the temporary directory.

For example, iso9660 will create a sub-directory where it stores the
kernel (in case of initramfs or initrd).

So, we must run the PRE_GEN hooks after we cleanup/create the temporary
directory.

Fixes:
    https://gitlab.com/buildroot.org/buildroot/-/jobs/42835965
    https://gitlab.com/buildroot.org/buildroot/-/jobs/42835967

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/common.mk b/fs/common.mk
index c17c4585ff..b06e9b5597 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -69,9 +69,9 @@ endif
 
 $$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
 	@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
-	$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
 	rm -rf $(FS_DIR)
 	mkdir -p $(FS_DIR)
+	$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
 	echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
 	echo "set -e" >> $$(FAKEROOT_SCRIPT)
 	echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] fs: prepare temp directory before running PRE_GEN hooks
  2017-12-02 11:55 [Buildroot] [PATCH] fs: prepare temp directory before running PRE_GEN hooks Yann E. MORIN
@ 2017-12-02 13:41 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-12-02 13:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  2 Dec 2017 12:55:05 +0100, Yann E. MORIN wrote:
> Some filesystems have PRE_GEN hooks that create a directory structure
> under the temporary directory.
> 
> For example, iso9660 will create a sub-directory where it stores the
> kernel (in case of initramfs or initrd).
> 
> So, we must run the PRE_GEN hooks after we cleanup/create the temporary
> directory.
> 
> Fixes:
>     https://gitlab.com/buildroot.org/buildroot/-/jobs/42835965
>     https://gitlab.com/buildroot.org/buildroot/-/jobs/42835967
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  fs/common.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-02 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 11:55 [Buildroot] [PATCH] fs: prepare temp directory before running PRE_GEN hooks Yann E. MORIN
2017-12-02 13:41 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox