Bug#702191: libreoffice: usr/bin/libreoffice script bad symlink following
Package: libreoffice
Version: 1:3.5.4+dfsg-4
Severity: normal
content of usr/bin/libreoffice:
sd_cwd=`pwd`
sd_res=$0
while [ -h "$sd_res" ] ; do
cd "`dirname "$sd_res"`"
sd_basename=`basename "$sd_res"`
sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
done
cd "`dirname "$sd_res"`"
sd_prog=`pwd`
cd "$sd_cwd"
sd_res is a symlink in debian so it goes in there
please use something sane like readlink to get the target instead of
that weird sed line
a user in #ubuntu+1 reports issues with it because he apparently has
some invalid locale in the month part of ls -l.
in principle this should be possible in debian too as the code is the same.
the user got:
02:04 <Allard> /usr/bin/libreoffice: 49: cd: can't cd to lrwxrwxrwx 1
root root 34 ���../lib/libreoffice/program
02:04 <Allard> /usr/bin/libreoffice: 156: exec: /usr/bin/oosplash: not found
Replacing the sed line with readlink fixed the issue for the user.
Reply to: