Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC] package: Redownload HEAD packages every build
@ 2013-09-27 14:43 Clayton Shotwell
  2013-09-27 14:51 ` Clayton Shotwell
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Clayton Shotwell @ 2013-09-27 14:43 UTC (permalink / raw)
  To: buildroot

Adding a check to remove a downloaded package if the version is HEAD. This causes the package to be re-downloaded with updated software. This feature is very useful during package development.

Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>
---
 package/pkg-generic.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index bfc4dc1..859c4a9 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -27,6 +27,13 @@
 # Retrieve the archive
 $(BUILD_DIR)/%/.stamp_downloaded:
 ifeq ($(DL_MODE),DOWNLOAD)
+# Remove the pre-downloaded tar file if the package is a HEAD version
+	$(Q)( \
+	if test $($(PKG)_VERSION) == HEAD -a -e $(DL_DIR)/$($(PKG)_SOURCE); then \
+		rm $(DL_DIR)/$($(PKG)_SOURCE); \
+		$(call MESSAGE,"Removing $(PKG) HEAD source file"); \
+	fi; \
+	)
 # Only show the download message if it isn't already downloaded
 	$(Q)if test ! -e $(DL_DIR)/$($(PKG)_SOURCE); then \
 		$(call MESSAGE,"Downloading") ; \
-- 
1.7.1

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

end of thread, other threads:[~2013-10-02 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 14:43 [Buildroot] [RFC] package: Redownload HEAD packages every build Clayton Shotwell
2013-09-27 14:51 ` Clayton Shotwell
2013-09-27 15:11 ` Thomas De Schampheleire
2013-10-01 16:08 ` Arnout Vandecappelle
2013-10-01 18:51 ` Thomas Petazzoni
2013-10-01 20:01   ` clshotwe at rockwellcollins.com
2013-10-01 21:37     ` Thomas Petazzoni
2013-10-01 21:54       ` Ryan Barnett
2013-10-02  7:13         ` Thomas Petazzoni
2013-10-02 18:34           ` clshotwe at rockwellcollins.com

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