how to update dependencies.tsv

Dimiter Naydenov dimiter.naydenov at canonical.com
Wed Oct 29 08:05:43 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29.10.2014 09:46, David Cheney wrote:
> Does your $GOPATH include more than one entry ?
No, it only has a single path.

> 
> The make target should probably just expect godeps to be in your
> $PATH.
That's a good point. I did some experiments adding:
GODEPS := $(shell which godeps)

at the beginning and then trying to use it. I found out what the
problem was - apparently the Makefile was written with the idea that
godeps shouldn't be called unless JUJU_MAKE_GODEPS is set to true.

With the following patch, I can now run "make godeps" and related
targets without an issue:

diff --git a/Makefile b/Makefile
index 3b6f2ec..4fe7611 100644
- --- a/Makefile
+++ b/Makefile
@@ -37,13 +37,9 @@ ifeq ($(CURDIR),$(PROJECT_DIR))
 ifeq ($(JUJU_MAKE_GODEPS),true)
 $(GOPATH)/bin/godeps:
        go get launchpad.net/godeps
- -
+endif
 godeps: $(GOPATH)/bin/godeps
        $(GOPATH)/bin/godeps -u dependencies.tsv
- -else
- -godeps:
- -       @echo "skipping godeps"
- -endif

 build: godeps
        go build $(PROJECT)/...

Somebody else might find this useful.

As for the "update godeps" target John suggested, I still think it's
the easiest way to do it correctly. E.g. it could be a new target:

+
+updeps: godeps
+       GOOS=windows $(GOPATH)/bin/godeps -t ./... > dependencies.tsv


> 
> On Wed, Oct 29, 2014 at 6:37 PM, Dimiter Naydenov 
> <dimiter.naydenov at canonical.com
> <mailto:dimiter.naydenov at canonical.com>> wrote:
> 
> +1, in fact there is already a "godeps" target in the Makefile, but
> I never managed to get it working. It's looking for
> $(GOPATH)/bin/godeps binary and I have it right there on my
> machine, but make still claims "File `godeps' does not exist."
> (when running $ make -d godeps).
> 
> Somebody with better make-fu knowledge should probably give a hand 
> with this :)
> 
> On 29.10.2014 05:58, John Meinel wrote:
>> can we please just have "make dependencies.tsv" do the right
>> thing so we don't have to remember which set of flags and env
>> vars we need to use this time?
> 
>> I'm also not 100% sure that we'll have even downloaded all the 
>> windows dependencies if they are a "strict superset" given that
>> you are running "go get" on a Linux machine to start with.
> 
>> John =:->
> 
> 
>> On Tue, Oct 28, 2014 at 11:41 PM, Nate Finch 
>> <nate.finch at canonical.com <mailto:nate.finch at canonical.com>
> <mailto:nate.finch at canonical.com
> <mailto:nate.finch at canonical.com>>>
>> wrote:
> 
>> We have a few windows dependencies that are not (and in some
>> cases can not be) imported for the linux build.  Luckily, the
>> windows dependencies are a strict super set of the linux
>> dependencies, so we can still use godeps to create
>> dependencies.tsv, just by setting GOOS first, thusly (from the
>> root of github.com/juju/juju <http://github.com/juju/juju> 
>> <http://github.com/juju/juju>):
> 
>> GOOS=windows godeps -t ./... > dependencies.tsv
> 
>> Please use this command line when updating dependencies.tsv so 
>> that is keeps a standard format which will minimize conflicts in 
>> the file.
> 
>> -Nate
> 
>> -- Juju-dev mailing list Juju-dev at lists.ubuntu.com
>> <mailto:Juju-dev at lists.ubuntu.com> 
>> <mailto:Juju-dev at lists.ubuntu.com
> <mailto:Juju-dev at lists.ubuntu.com>> Modify settings or unsubscribe
>> at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
> 
> 
> 
> 
> 
> 
> 
> -- Juju-dev mailing list Juju-dev at lists.ubuntu.com
> <mailto:Juju-dev at lists.ubuntu.com> Modify settings or unsubscribe
> at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
> 
> 

- -- 
Dimiter Naydenov <dimiter.naydenov at canonical.com>
juju-core team
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUUJ/XAAoJENzxV2TbLzHwEEwIAJcohbpcUZ6wVG30bhoMsDRa
NkJaNeMErfEZIHa0kA9iqACXKhLMngS7M/Dbmryuat/X9NFPOkElLLBZnyydhmqv
DcQXU5Sc6s1K1T5UxXH13jJ80JHQgKo5hg0LO/5gnd81R/iz4mQ7ns54uD8hnNfE
D70FcxBIt+kiMXAU0WB/r8kC0++2afrNQQGpvAp8RntGtCNSH501AAkDq0WmtLw/
iq/8uhLD8lixU/uPHG1PxaxAWaDZ3nkkievl+0t9cgYZAe6xQBOYs9DA+pPMSTxS
Oo+dgsakCKeCqv+7zI4D/h754VzaWyvLYsX0ldWpn+12jywWJHZwoznh5Fm6xYA=
=FwVZ
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list