Skip to content

Conversation

@lukashes
Copy link

@lukashes lukashes commented Oct 7, 2015

All golang sources from https://golang.org/dl/ placed in: https://stortage.googleapis.com/golang/...

@spraints
Copy link
Collaborator

spraints commented Oct 7, 2015

I can't get curl to download anything from storage.googleapis.com. Can you paste an example of goenv installing an old go version with this URL?

@lukashes
Copy link
Author

lukashes commented Oct 7, 2015

Example of curl request:

curl -I https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz
HTTP/1.1 200 OK

The minimal version is 1.2.2 and current is 1.5.1

Installation:

$ goenv install 1.3
...
Installed 1.3
$ goenv versions
1.2.2
1.3
1.5
1.5.1

@spraints
Copy link
Collaborator

spraints commented Oct 7, 2015

Won't go >= 1.2 get downloaded from golang.org?

@lukashes
Copy link
Author

lukashes commented Oct 8, 2015

I understood:

$ curl -I https://golang.org/dl/go1.2.2.linux-amd64.tar.gz
HTTP/1.1 302 Found
Location: https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz

But if I checkout my changes I see:

goenv install 1.5.1

curl: (22) The requested URL returned error: 404 Not Found
goenv: unable to install Go `1.5.1' from binary, download not available at https://go.googlecode.com/files/go1.5.1.linux-amd64.tar.gz

It seems like error in vercomp function. Please try to install 1.5.1 version.

@lukashes
Copy link
Author

lukashes commented Oct 8, 2015

I see problem:

$ goenv help install
Usage: goenv install <version>

Versions should be in the form of N.N.N

And after I try 1.5.1 as it written in documentation, func vercomp returns "1 1" instead "1"

@spraints
Copy link
Collaborator

It seems like error in vercomp function.

And after I try 1.5.1 as it written in documentation, func vercomp returns "1 1" instead "1"

Ah ha! I'm fine with dropping support for the really old versions of go (1.0, 1.1), which means that this part of the install script could avoid doing vercomp at all and just download from golang.org. What do you think?

@lukashes
Copy link
Author

lukashes commented Nov 2, 2015

Hi! I missed your comment :) I think is good idea to support new versions. Can I do anything to help you?

@spraints
Copy link
Collaborator

spraints commented Nov 2, 2015

I mean, instead of this:

rtn=$(vercomp ${version} 1.2)
# URL to download from
if [ "$rtn" == "1" ]
then
    download="http://golang.org/dl/go${version}.${platform}-${arch}${extra}.tar.gz"
else
    download="https://storage.googleapis.com/golang/go${version}.${platform}-${arch}${extra}.tar.gz"
fi

would this work?

download="http://golang.org/dl/go${version}.${platform}-${arch}${extra}.tar.gz"

@lukashes
Copy link
Author

lukashes commented Nov 3, 2015

Yes, it works!

lukashes@lukashes-pc:~/src/goenv$ goenv install 1.3.1
####################################                                      50,7%^C
lukashes@lukashes-pc:~/src/goenv$ goenv install 1.5.1
#########                                                                 13,4%^C

@spraints
Copy link
Collaborator

spraints commented Nov 3, 2015

Yes, it works!

Great! Can you try out #22 and make sure I didn't break something on that branch?

@ryurock
Copy link

ryurock commented Dec 26, 2015

Hey. is this brach merged master?

@ryurock
Copy link

ryurock commented Dec 26, 2015

goenv-install is it arrived failed to pull this pullrequest in darwin.
But storage is like are extra also lost other than the url.

What both modified and I have to pullrequest.

#23

@spraints
Copy link
Collaborator

spraints commented Jan 4, 2016

@ryurock this pull request is still open, so it hasn't been merged. #23 looks like it'd be equally important. I'd rather merge #22 + #23 than this PR.

@ryurock
Copy link

ryurock commented Jan 18, 2016

@spraints

I along with your intention.
Pull this request to close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants