From 5d66647e0e30083e19c91e3f4b0236d7b51d7e31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Pineau?= Date: Fri, 17 Aug 2012 14:30:34 +0200 Subject: [PATCH] Correct handling of amd64 in roacle-jdk6.1->4 and improve error message when used with unknown archives --- debian/changelog | 1 + lib/oracle-j2re.sh | 4 ++-- lib/oracle-j2sdk.sh | 4 ++-- make-jpkg | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index a7f6d49..527516c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ java-package (0.51) unstable; urgency=low * Add java6-{runtime|sdk|...} to the provides line in generated packages Closes: #684993 * Add java6-{runtime|sdk|...} to the provides line in generated packages Closes: #684993 * Drop installation debconf note Closes: #685082 + * Correct handling of amd64 in roacle-jdk6.1->4 and improve error message when used with unknown archives [Emmanuel Bourg] * Improved detection of the JRE/JDK version (supports 2 digits Java 7 updates) diff --git a/lib/oracle-j2re.sh b/lib/oracle-j2re.sh index 4532c07..a7b6207 100644 --- a/lib/oracle-j2re.sh +++ b/lib/oracle-j2re.sh @@ -2,7 +2,7 @@ j2se_detect_oracle_j2re=oracle_j2re_detect oracle_j2re_detect() { - if [[ $archive_name =~ jre-([0-9]+)u([0-9]+)-linux-(i586|x64)\.(bin|tar\.gz) ]] + if [[ $archive_name =~ jre-([0-9]+)u([0-9]+)-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[2]} @@ -19,7 +19,7 @@ oracle_j2re_detect() { if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi ;; amd64|x86_64-linux-gnu) - if [[ "$j2se_arch" != "x64" ]]; then compatible=0; fi + if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi ;; esac diff --git a/lib/oracle-j2sdk.sh b/lib/oracle-j2sdk.sh index 091a0cb..16db30e 100644 --- a/lib/oracle-j2sdk.sh +++ b/lib/oracle-j2sdk.sh @@ -2,7 +2,7 @@ j2se_detect_oracle_j2sdk=oracle_j2sdk_detect oracle_j2sdk_detect() { - if [[ $archive_name =~ jdk-([0-9]+)u([0-9]+)-linux-(i586|x64)\.(bin|tar\.gz) ]] + if [[ $archive_name =~ jdk-([0-9]+)u([0-9]+)-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[2]} @@ -19,7 +19,7 @@ oracle_j2sdk_detect() { if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi ;; amd64|x86_64-linux-gnu) - if [[ "$j2se_arch" != "x64" ]]; then compatible=0; fi + if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi ;; esac diff --git a/make-jpkg b/make-jpkg index 41899db..4c542db 100755 --- a/make-jpkg +++ b/make-jpkg @@ -232,7 +232,7 @@ done echo if [[ -z "$j2se_found" ]]; then - echo "No matching plugin was found." + echo "No matching packaging method was found for $archive_name. Please make sure you are using a tar.gz or self-extracting archive" fi -- 2.39.5