fs/iso9660: really create initrd temp dir
PATCH v2 1/1 fs/iso9660: really create initrd temp dir
In case we're using an initrd, we create an empty "root" directory that will contain only the bootloader stuff, not the actual root filesystem, because it is in an initrd (standalone or initramfs).
We have to ensure that the directory is empty before assembling the filesystem (to avoid any file lingering from a previous run, like the sequence "make; make"). So we first remove it before we create it, so that on each build (especially not-from-scratch builds) get the exact expected content without any leftover.
However, the macro responsible for that, although defined since was never called.
Fix that by registering it as a pre-gen hook.
Note: the directory need not be created, as there are quite a few "install -D" commands that ensure it is created. Yet, we prefer to create it explicitly to avoid any confusion.
---
Changes v1 -> v2:
- expand commit log; explain why it was seemingly working (Thomas)
--- fs/iso9660/iso9660.mk | 1 + 1 file changed, 1 insertion(+)
fs/iso9660/iso9660.mk +1 -0
@@ -40,6 +40,7 @@ define ROOTFS_ISO9660_CREATE_TEMPDIR $(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR) mkdir -p $(ROOTFS_ISO9660_TARGET_DIR) endef +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_CREATE_TEMPDIR else ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR) endif
Signature · 1 line
2.11.0
Arnout Vandecappelle
AppliedPATCH v2 1/1 fs/iso9660: really create initrd temp dir
Quoted 13 lines · Yann E. MORIN
In case we're using an initrd, we create an empty "root" directory that will contain only the bootloader stuff, not the actual root filesystem, because it is in an initrd (standalone or initramfs).
We have to ensure that the directory is empty before assembling the filesystem (to avoid any file lingering from a previous run, like the sequence "make; make"). So we first remove it before we create it, so that on each build (especially not-from-scratch builds) get the exact expected content without any leftover.
However, the macro responsible for that, although defined since was never called.
Quoted 8 lines
Fix that by registering it as a pre-gen hook.
Note: the directory need not be created, as there are quite a few "install -D" commands that ensure it is created. Yet, we prefer to create it explicitly to avoid any confusion.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v2 1/1 fs/iso9660: really create initrd temp dir
In reply to Yann E. MORINQuoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
In case we're using an initrd, we create an empty "root" directory that will contain only the bootloader stuff, not the actual root filesystem, because it is in an initrd (standalone or initramfs).
We have to ensure that the directory is empty before assembling the filesystem (to avoid any file lingering from a previous run, like the sequence "make; make"). So we first remove it before we create it, so that on each build (especially not-from-scratch builds) get the exact expected content without any leftover.
However, the macro responsible for that, although defined since was never called.
Fix that by registering it as a pre-gen hook.
Note: the directory need not be created, as there are quite a few "install -D" commands that ensure it is created. Yet, we prefer to create it explicitly to avoid any confusion.
Quoted 6 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Changes v1 -> v2:
- expand commit log; explain why it was seemingly working (Thomas)
Committed to 2017.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard