Skip to contentSkip to conversation

core: ensure $BIANRES_DIR exist before post-image scripts

PATCH New Yann E. MORIN 3 participants 3 messages Aug 4, 2019 – Aug 31, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 core: ensure $BIANRES_DIR exist before post-image scripts

From: Brent Generous <[email protected]>

When no filesystem is enabled, the $BINARIES_DIR is not created. Yet, the post-image scripts are still run. When those want to generate an image in there, they may fail as the dirctory does not exist (it did exist before we started applying preparatory changes for top-level parallel build, so scripts got to rely on that assumption).

Do in target-post-image as we do in the sdk rule: create the directory before calling the scripts.

[yann.morin.1998 at free.fr:
- create the directory before calling the scripts
- don't drop the creation in the sdk rule
]

---
Changes v2 -> v3:
- drop leftover from v1

Changes v1 -> v2:
- create the directory before calling post-image scripts

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index ee382abf15..2f913482f9 100644
@@ -810,6 +810,7 @@ endif # merged /usr
 .PHONY: target-post-image
 target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
 	@rm -f $(ROOTFS_COMMON_TAR)
+	$(Q)mkdir -p $(BINARIES_DIR)
 	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
 		$(call MESSAGE,"Executing post-image script $(s)"); \
 		$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
Signature · 1 line
2.20.1
#1 lore raw

PATCH v3 1/1 core: ensure $BIANRES_DIR exist before post-image scripts

s/BIANRES_DIR/BINARIES_DIR/ in subject.

Signature · 1 line
Carlos Santos <[email protected]>
#2 lore raw

PATCH v3 1/1 core: ensure $BIANRES_DIR exist before post-image scripts

In reply to Yann E. MORIN
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

From: Brent Generous <[email protected]>
When no filesystem is enabled, the $BINARIES_DIR is not created. Yet, the post-image scripts are still run. When those want to generate an image in there, they may fail as the dirctory does not exist (it did exist before we started applying preparatory changes for top-level parallel build, so scripts got to rely on that assumption).

Do in target-post-image as we do in the sdk rule: create the directory before calling the scripts.

Quoted 6 lines

[yann.morin.1998 at free.fr:
- create the directory before calling the scripts
- don't drop the creation in the sdk rule
]

Committed to 2019.02.x and 2019.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard