aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-11-14 18:31:41 +0200
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-11-14 18:31:41 +0200
commit760b6076bc4b55f13e014df8460e2d8d17f5e060 (patch)
treea1d4fe3a865a5f67495b79a4a308dba8bf2f5a73
parent404fddf9e497aff0eb6508ef47a1b4861072b5fc (diff)
downloadlinaro-android-build-tools-760b6076bc4b55f13e014df8460e2d8d17f5e060.tar.gz
setup-build-android: Install Oracle Java6 package instead of Sun ones.
Upgrading to Ubuntu 14.04, historical Sun release of JDK 6 no longer can be installed (it conflicts with "apt"). So, switch to recommended way to install Oracle JDK 6. In teh process, refactor license acceptance code a bit. Change-Id: I29fce39c601d093990106a83286fdce697af5b6f
-rwxr-xr-xnode/setup-build-android22
1 files changed, 10 insertions, 12 deletions
diff --git a/node/setup-build-android b/node/setup-build-android
index 100537e..daa9ac7 100755
--- a/node/setup-build-android
+++ b/node/setup-build-android
@@ -43,23 +43,21 @@ chmod a+x /usr/local/bin/repo
sed -i.bk 's,^\(.*://[^.]*.ec2.archive.ubuntu.com\)/,\1.s3.amazonaws.com/,' /etc/apt/sources.list
apt-get-retry --non-fatal update
-# We do update as part of early node init (to get this script actually)
-#apt-get update
-
# add feature to allow add-apt-repository
apt-get-retry install -y python-software-properties unixodbc java-common
-# enable partner repo for sun-java6
-##add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
-##apt-get update
-
-wget -nv --no-check-certificate http://android-build.linaro.org/seed/sun-java6-bin_6.26-2natty1_amd64.deb \
- http://android-build.linaro.org/seed/sun-java6-jdk_6.26-2natty1_amd64.deb \
- http://android-build.linaro.org/seed/sun-java6-jre_6.26-2natty1_all.deb
+# Install Oracle JDK 6 for older Android versions
+add-apt-repository -y ppa:webupd8team/java
+apt-get-retry --non-fatal update
export DEBIAN_FRONTEND=noninteractive
-##apt-get install -y sun-java6-jdk || (debconf 'echo SET shared/accepted-sun-dlj-v1-1 true' || true; apt-get install -f -y; apt-get install -y sun-java6-jdk)
-dpkg -i sun-java6-* || (debconf 'echo SET shared/accepted-sun-dlj-v1-1 true' || true; apt-get install -f -y; dpkg -i sun-java6-*)
+# Will fail due to non-accepted license
+apt-get install -y oracle-java6-installer || true
+debconf 'echo SET shared/accepted-sun-dlj-v1-1 true' || true
+debconf 'echo SET shared/accepted-oracle-license-v1-1 true' || true
+apt-get install -f -y
+apt-get install -y oracle-java6-installer
+
# Install basic development packages
# Do not install toolchains and other variable stuff here