From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

openjdk8-zulu-full: fix build when new openjdk version comes out

Our Makefile uses "wget -c" to avoid re-downloading the very large openjdk
package on every build, or allow the build to continue if interrupted in
the middle of the long download.

However, "wget -c" can only be used to retrieve the *same* file again.
We actually retrieve the latest version, which may be a completely different
file... So "wget -c" may fail or result in an unusable file.

What we need to do is to name the target of the download with the same
unique name of the version we are downloading. If a new version comes
out, "wget -c" will download it from scratch because the target file
does not yet exist. The older download will remain unused, and all of
the downloads will be removed eventually by a "make clean".

Signed-off-by: Nadav Har'El <n...@scylladb.com>

---
diff --git a/openjdk8-zulu-full/Makefile b/openjdk8-zulu-full/Makefile
--- a/openjdk8-zulu-full/Makefile
+++ b/openjdk8-zulu-full/Makefile
@@ -8,17 +8,18 @@
 jvm_dir=install/usr/lib/jvm

 java8_jdk_tarball_url = $(shell ./latest.sh)
+java8_jdk_tarball = $(notdir $(java8_jdk_tarball_url))

 java8_name = $(shell echo $(java8_jdk_tarball_url) | grep -o zulu8.*x64)

 SRC = $(shell readlink -f ../..)

 module:
        mkdir -p upstream
-       wget -c -O upstream/openjdk8.tar.gz $(java8_jdk_tarball_url)
+       wget -c -O upstream/$(java8_jdk_tarball) $(java8_jdk_tarball_url)
        rm -rf install
        mkdir -p $(jvm_dir)/java
-       cd install && tar xfz ../upstream/openjdk8.tar.gz
+       cd install && tar xfz ../upstream/$(java8_jdk_tarball)
        mv install/$(java8_name)/jre $(jvm_dir)/java/jre
        rm -rf install/$(java8_name)
        rm -rf $(jvm_dir)/java/jre/bin

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to