Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain-external: make extraction idempotent
@ 2015-11-03 23:09 Arnout Vandecappelle
  2015-11-04  7:33 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Arnout Vandecappelle @ 2015-11-03 23:09 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 toolchain/toolchain-external/toolchain-external.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index e1e8d2f..fa4ddab 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -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
-- 
2.6.2

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

* [Buildroot] [PATCH] toolchain-external: make extraction idempotent
  2015-11-03 23:09 [Buildroot] [PATCH] toolchain-external: make extraction idempotent Arnout Vandecappelle
@ 2015-11-04  7:33 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-11-04  7:33 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle (Essensium/Mind),

On Wed, 4 Nov 2015 00:09:35 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> 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.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  toolchain/toolchain-external/toolchain-external.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied, 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:[~2015-11-04  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 23:09 [Buildroot] [PATCH] toolchain-external: make extraction idempotent Arnout Vandecappelle
2015-11-04  7:33 ` Thomas Petazzoni

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