The latest docker-engine release changes the vendor tree slightly. The
Go tool will recognize a ./vendor directory and use it as a vendor tree
automatically, but only when run inside a valid GOPATH. This patch
adjusts how the GOPATH is built - now docker/docker is linked into a
blank tree, and the Go tool recognizes the ./vendor directory correctly.
Signed-off-by: Christian Stewart <christian@paral.in>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
DOCKER_ENGINE_DEPENDENCIES = host-go host-pkgconf
-DOCKER_ENGINE_GOPATH = "$(@D)/vendor"
+DOCKER_ENGINE_GOPATH = "$(@D)/gopath"
DOCKER_ENGINE_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
CGO_ENABLED=1 \
CGO_NO_EMULATION=1 \
define DOCKER_ENGINE_BUILD_CMDS
$(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
- cd $(@D); $(DOCKER_ENGINE_MAKE_ENV) \
+ cd $(@D)/gopath/src/github.com/docker/docker; \
+ $(DOCKER_ENGINE_MAKE_ENV) \
$(HOST_DIR)/usr/bin/go build -v \
-o $(@D)/bin/$(target) \
-tags "$(DOCKER_ENGINE_BUILD_TAGS)" \