United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6526895 JavaDB should co-package with JDK 7 (Linux)
6526895 : JavaDB should co-package with JDK 7 (Linux)

Details
Type:
Enhancement
Submit Date:
2007-02-20
Status:
Resolved
Updated Date:
2010-12-04
Project Name:
JDK
Resolved Date:
2009-07-22
Component:
deploy
OS:
linux
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
7

Related Reports
Backport:
Relates:

Sub Tasks

Description
JavaDB is to be copackaged with Java 6 (Update 2).
For Linux this means bundling the unaltered JavaDB
RPMs and modifying the "self-installation script"
to install these RPMs as well (taking care not to
possibly downgrade).
The fix for this (uncverified) was delivered into JDK7 b64 as part of:
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7

                                    

Comments
SUGGESTED FIX

The changes are made to:
	install/make/installer/bundles/linux/Makefile
	install/make/common/sfx2sh

However, the more easily understood change is the output
of sfx2sh, the initial (mostly new) section of which is
captued below.


release_comp() {
    if [ "$1" = "$2" ] ; then
        echo "eq"
    else
        lrel=`printf "%s\n%s\n" $1 $2 | \
            sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n | \
            head -1`
        if [ "$1" = "${lrel}" ]; then
            echo "lt"
        else
            echo "gt"
        fi
    fi
}


agree() {
    while [ "true" ]; do
        read reply leftover
        case $reply in
            [yY] | [yY][eE][sS])
                echo "yes"
                return 0
                ;;
            [nN] | [nN][oO])
                echo "no"
                return 0
                ;;
        esac
    done
}


install_JavaDB() {
    installed_version=`rpm -q --queryformat '%{VERSION}.%{RELEASE}' sun-javadb-common`
    if [ $? = 0 ] && [ ! -z ${installed_version} ] ; then
        case `release_comp ${installed_version} '10.2.2.0.1'` in
            "lt" )
                printf "\nJava DB version %s is currently installed.\n" \
                     ${installed_version}
                printf "Upgrade to version 10.2.2.0.1 ? [yes,no]\n"
                if [ "`agree`" = "no" ] ; then
                    printf "Java DB not updated\n"
                    return 0
                fi
                mode="upgrade"
                ;;
            "eq" )
                mode="install"
                ;;
            "gt" )
                printf "Newer Java DB version (%s) is already installed.\n" \
                     ${installed_version}
                return 0
                ;;
            * )
                return 1
                ;;
        esac
    else
        mode="install"
    fi

    printf "Installing JavaDB\n"
    for i in sun-javadb-common-10.2.2-0.1.i386.rpm sun-javadb-core-10.2.2-0.1.i386.rpm sun-javadb-client-10.2.2-0.1.i386.rpm sun-javadb-demo-10.2.2-0.1.i386.rpm sun-javadb-docs-10.2.2-0.1.i386.rpm sun-javadb-javadoc-10.2.2-0.1.i386.rpm  ; do
        rpm_name=`echo $i | sed -e "s/-10.2.2.0.1.*//"`
        rpm -q ${rpm_name} >/dev/null 2>&1
        if [ "$?" = 0 ] ; then  # Installed (any version)
            if [ "${mode}" = "install" ] ; then
                continue
            else
                rpm_mode="-U --nodeps"
            fi
        else
            rpm_mode="-i"
        fi
        rpm ${rpm_mode} -vh `pwd`/$i
    done
    return 0
}
                                     
2007-03-19
EVALUATION

As per description
                                     
2007-02-21



Hardware and Software, Engineered to Work Together