[lxc-devel] [lxd/master] Bugfixes

stgraber on Github lxc-bot at linuxcontainers.org
Fri Feb 17 21:43:08 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170217/dae1c36a/attachment.bin>
-------------- next part --------------
From 47e5368c976e29e160e1ba245e839a868d404df5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 17 Feb 2017 16:02:12 -0500
Subject: [PATCH 1/2] Makefile: Drop repeated calls to "go get"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Not needed anymore.

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 Makefile | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 5d092ed..e2c7584 100644
--- a/Makefile
+++ b/Makefile
@@ -13,27 +13,18 @@ TAGS=$(shell test -e /usr/include/sqlite3.h && echo "-tags libsqlite3")
 
 .PHONY: default
 default:
-	# Must a few times due to go get race
-	-go get -t -v -d ./...
-	-go get -t -v -d ./...
-	-go get -t -v -d ./...
+	go get -t -v -d ./...
 	go install -v $(TAGS) $(DEBUG) ./...
 	@echo "LXD built successfully"
 
 .PHONY: client
 client:
-	# Must a few times due to go get race
-	-go get -t -v -d ./...
-	-go get -t -v -d ./...
-	-go get -t -v -d ./...
+	go get -t -v -d ./...
 	go install -v $(TAGS) $(DEBUG) ./lxc
 	@echo "LXD client built successfully"
 
 .PHONY: update
 update:
-	# Must a few times due to go get race
-	-go get -t -v -d -u ./...
-	-go get -t -v -d -u ./...
 	go get -t -v -d -u ./...
 	@echo "Dependencies updated"
 
@@ -68,9 +59,6 @@ dist:
 	ln -s ../../../../lxd-$(VERSION) $(TMP)/dist/src/github.com/lxc/lxd
 	
 	# Download dependencies
-	-cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./...
-	-cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./...
-	-cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./...
 	cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./...
 	
 	# Assemble tarball
@@ -92,7 +80,7 @@ po/%.po: po/$(DOMAIN).pot
 	msgmerge -U po/$*.po po/$(DOMAIN).pot
 
 update-po:
-	-for lang in $(LINGUAS); do\
+	for lang in $(LINGUAS); do\
 	    msgmerge -U $$lang.po po/$(DOMAIN).pot; \
 	    rm -f $$lang.po~; \
 	done

From 50b82f41f3fe6c62a220986d967b12bc0964a0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 17 Feb 2017 16:04:20 -0500
Subject: [PATCH 2/2] Makefile: Always include gorilla/context
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index e2c7584..25d894e 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,9 @@ dist:
 	# Download dependencies
 	cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./...
 	
+	# Workaround for gorilla/mux on Go < 1.7
+	cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -v -d github.com/gorilla/context
+	
 	# Assemble tarball
 	rm $(TMP)/dist/src/github.com/lxc/lxd
 	ln -s ../../../../ $(TMP)/dist/src/github.com/lxc/lxd


More information about the lxc-devel mailing list