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
}
|