You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Svet <no...@github.com> on 2016/12/23 15:19:15 UTC
[jclouds/jclouds] Fix Java install on Ubuntu Xenial (#1045)
Xenial doesn't have Java 6 package.
Select the java package dynamically based on what's available. Don't hardcode Java 6.
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds/pull/1045
-- Commit Summary --
* Fix Java install on Ubuntu Xenial
-- File Changes --
M compute/src/test/resources/initscript_with_java.sh (8)
M compute/src/test/resources/initscript_with_jetty.sh (8)
M compute/src/test/resources/runscript.sh (8)
M scriptbuilder/src/main/resources/functions/installOpenJDK.sh (8)
M scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh (8)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/1045.patch
https://github.com/jclouds/jclouds/pull/1045.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045
Re: [jclouds/jclouds] JCLOUDS-1133: Use latest Java package available
(#1045)
Posted by Ignasi Barrera <no...@github.com>.
Pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/325a6890) and [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/86f518dd). Apologies for the delay @neykov!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#issuecomment-275063797
Re: [jclouds/jclouds] Fix Java install on Ubuntu Xenial (#1045)
Posted by Ignasi Barrera <no...@github.com>.
nacx commented on this pull request.
> @@ -177,7 +177,11 @@ function installOpenJDK() {
echo reusing JAVA_HOME $JAVA_HOME
else
if which dpkg &> /dev/null; then
- apt-get-update && apt-get-install openjdk-6-jdk
+ apt-get update && \
+ PACKAGE=`apt-cache search --names-only '^openjdk-.-jdk$' | sort -r | cut -d' ' -f1 | head -1` && \
+ [ ! -z "$PACKAGE" ] && \
+ DEBIAN_FRONTEND=noninteractive && \
+ { apt-get -q -y install $PACKAGE-headless || apt-get -q -y install $PACKAGE; }
Better use the [apt-get-install](https://github.com/jclouds/jclouds/blob/master/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh#L18) alias.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#pullrequestreview-14314142
Re: [jclouds/jclouds] JCLOUDS-1133: Use latest Java package available
(#1045)
Posted by Ignasi Barrera <no...@github.com>.
Closed #1045.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#event-935860285
Re: [jclouds/jclouds] Fix Java install on Ubuntu Xenial (#1045)
Posted by Svet <no...@github.com>.
neykov commented on this pull request.
> @@ -177,7 +177,11 @@ function installOpenJDK() {
echo reusing JAVA_HOME $JAVA_HOME
else
if which dpkg &> /dev/null; then
- apt-get-update && apt-get-install openjdk-6-jdk
+ apt-get update && \
+ PACKAGE=`apt-cache search --names-only '^openjdk-.-jdk$' | sort -r | cut -d' ' -f1 | head -1` && \
+ [ ! -z "$PACKAGE" ] && \
+ DEBIAN_FRONTEND=noninteractive && \
+ { apt-get -q -y install $PACKAGE-headless || apt-get -q -y install $PACKAGE; }
Oh it's an alias, wondered how it was working before :). Will update.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045
Re: [jclouds/jclouds] JCLOUDS-1133: Use latest Java package available
(#1045)
Posted by Svet <no...@github.com>.
Updated PR to use `apt-get-install` and support for yum.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#issuecomment-270644276
Re: [jclouds/jclouds] Fix Java install on Ubuntu Xenial (#1045)
Posted by Ignasi Barrera <no...@github.com>.
FTR: https://issues.apache.org/jira/browse/JCLOUDS-1133
Thanks @neykov! For consistency, could you apply the same pattern to the packages that are installed with yum?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#issuecomment-269006681