FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-18-2009, 08:08 PM
Jelle Boomstra
 
Default bug in startup script of package eclipse

Hi all,

the eclipse package contains a startup script that contains some errors that
do not match up with the way things are done Ubuntu (or debian) AFAIK.

this is the part where it broke after installing eclipse:

[...]
# If the user has not set JAVA_HOME, cycle through our list of compatible VM's
# and pick the first one that exists.
if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
echo "searching for compatible vm..."
javahomelist=`cat /etc/eclipse/java_home | grep -v '^#' | grep -v '^$' |
while read line ; do echo -n $line ; echo -n ":" ; done`
OFS="$IFS"
IFS=":"
for JAVA_HOME in $javahomelist ; do
echo -n " testing ${JAVA_HOME}..."
if [ -x "${JAVA_HOME}/bin/java" ]; then
export JAVA_HOME
echo "found"
break
else
echo "not found"
fi
done
IFS="$OFS"
fi
[...]

this goes wrong as java is handled by the alternatives system, and a
placeholder script lives in /usr/bin/java. The deb package should have a
suitable java as requirement and just use the default java. A test like this
one at runtime is too late and solves no problems.
The java version i use is:
OpenJDK Runtime Environment (build 1.6.0_0-b11)
OpenJDK Client VM (build 1.6.0_0-b11, mixed mode)

A further possible problem might be this piece of code some way down:

[...]
EXT=/usr/local/lib/eclipse/.eclipseextension
if [ ! -f $EXT ]; then
if ! touch $EXT 2>/dev/null; then
cat <<-EOF
Could not create $EXT. Please run as root:
touch $EXT
chmod 2775 $EXT
chown root:staff $EXT
EOF
fi
chmod 2775 $EXT 2> /dev/null || true
chown root:staff $EXT 2> /dev/null || true
fi
[...]
This is just plain silly. A script intended to be run by mortal users should
not try to write to this location. The package should create or provide such
a file a install, if it is needed at all.

I have attached a modified version that appears to work for me. I leave it to
the package maintainer to modify the install requirements.




--
With kind regards,
Jelle Boomstra
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org