Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Java7 downloads 7u9 instead of 7u10 #74

Closed
svein opened this issue Dec 19, 2012 · 10 comments
Closed

Java7 downloads 7u9 instead of 7u10 #74

svein opened this issue Dec 19, 2012 · 10 comments

Comments

@svein
Copy link

svein commented Dec 19, 2012

Seems like http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase7-521261.html doesn't have the updated java-7u10 listed and therefore gets the uld 7u9 instead. http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html list the correct one

@svein
Copy link
Author

svein commented Dec 19, 2012

On a closer look the problem is in the line TAG=git tag -l | tail -n1 git tag -l prints:
v7.10-1
v7.2-1
v7.3-1
v7.3-2
v7.4-1
v7.4-2
v7.5-1
v7.5-2
v7.6-1
v7.7-1
v7.9-1

and now we don't want the last, but the first. quick fix is to use head in stead of tail, but it will break when v7.11 comes out...

@raziel23x
Copy link

isnt there a way to rename them?

v7.10-1
v7.02-1
v7.03-1
v7.03-2
v7.04-1
v7.04-2
v7.05-1
v7.05-2
v7.06-1
v7.07-1
v7.09-1
and this would fix?

@svein
Copy link
Author

svein commented Dec 19, 2012

isnt there a way to rename them?
probably but then you'll have to ask https://github.com/rraptorr. And I guess changing name on all previous git tags is a lot of work. Better to use a different way to get latest version. Since we know all new releases will be in 10,11..20 etc. we can just grep -v "v.7.0" and use tail from there.

@hlawrenz
Copy link

I'm not sure if it's ideal, but you can change line 421 from:
TAG=git tag -l | tail -n1
to:
TAG=git tag -l | sort -t . -k 2 -g | tail -n1

@mikkorantalainen
Copy link

I'd suggest
git tag -l | sort -h -k1.2 | tail -n1
instead. That should work as long as all tags have syntax "v" followed by a number. The "-h" is GNU specific and if that's a problem "-n" should result to similar order for these tag names.

@mikkorantalainen
Copy link

In fact, I guess sort -n -k1.2 should be better choise in any case because there's no reason to expect names such as "v7.2k" to mean same as v7.2000".

@helterscelter
Copy link

I've not checked to see if this option is widely supported, but sort has a -V option which causes it to treat it's input as a list of Version numbers: ( http://linux.die.net/man/1/sort )

TAG=git tag -l | sort -V | tail -n1

seems to fix the issue for me

@helterscelter
Copy link

I have opened a pull-request for the solution I propose above.

@dakira
Copy link

dakira commented Jan 6, 2013

What is the reason to checkout the specific tag anyway? With the git clone a couple of lines earlier we already get the latest and that should be all we need, right?

@helterscelter
Copy link

from what I can tell, checking out a specific tag is intended to allow the script to be tailored to a specific JDK release. oracle is notorious for making their site VERY hard to scrape -- be it just crappy code or through actual intent.

checking out the latest tag as a basis for the script to do it's work, allows for the maintainer to commit into master without breaking proven/existing functionality -- ideally the latest tag version will continue to work, regardless of the status of master.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants