Skip to contentSkip to conversation

toolchain-external: make extraction idempotent

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Nov 3, 2015 – Nov 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-external: make extraction idempotent

Commit 23ffa7ec first extracts to the toolchain-external build directory and then moves everything to $(HOST_DIR)/opt/ext-toolchain. However, this is not idempotent, because moving directories over existing ones doesn't always work, particularly if the target is on another device.

Simply remove the destination contents before moving.

---
 toolchain/toolchain-external/toolchain-external.mk | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-external/toolchain-external.mk +1 -0
index e1e8d2f..fa4ddab 100644
@@ -483,6 +483,7 @@ TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
 # since it's actually a fairly special package, we need it to be moved
 # into TOOLCHAIN_EXTERNAL_INSTALL_DIR.
 define TOOLCHAIN_EXTERNAL_MOVE
+	rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/*
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
 	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
 endef
Signature · 1 line
2.6.2
#1 lore raw

PATCH 1/1 toolchain-external: make extraction idempotent

Dear Arnout Vandecappelle (Essensium/Mind),

Quoted 6 lines · Arnout Vandecappelle (Essensium/Mind)

Commit 23ffa7ec first extracts to the toolchain-external build directory and then moves everything to $(HOST_DIR)/opt/ext-toolchain. However, this is not idempotent, because moving directories over existing ones doesn't always work, particularly if the target is on another device.

Quoted 6 lines

Simply remove the destination contents before moving.

---
 toolchain/toolchain-external/toolchain-external.mk | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Thomas

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