OpenOffice.org automatic detection of file lock requirement does not work - WITH SOLUTION
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openoffice.org (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Hardy |
Fix Released
|
Undecided
|
Chris Cheney |
Bug Description
Binary package hint: openoffice.org
When switching from SuSE 10.0/OpenOffice 2.0 to Kubuntu 8.04/OpenOffice 2.4 I noticed that file locking no longer worked - two users were able to open the same document at the same time and save changes, with the last save winning. As this is a very undesirable situation I went to investigate. I found that (K)Ubuntu uses custom scripts to start OpenOffice and that these scripts contain some code to automatically determine whether $HOME or the edited file is located on a NFS (or Samba) share depending on the setting of FILE_LOCKING in
/etc/openoffice
Unfortunately, this code does not work - file locking is never enabled, despite the fact that we use NFS-mounted home directories. Having a closer look at /usr/lib/
[...current version of the script...]
if [ -z "$SAL_ENABLE_
case "$FILE_LOCKING" in
auto)
if ! file_or_home_on_nfs "$@"; then
# file locking now enabled by default
export SAL_ENABLE_
fi
[...]
The second if statement is never evaluated successfully, no matter what "file_or_
[...WORKING version...]
if [ -z "$SAL_ENABLE_
case "$FILE_LOCKING" in
auto)
if [ $? -eq 0 ]; then
# file locking now enabled by default
export SAL_ENABLE_
fi
[...]
This version works and correctly sets SAL_ENABLE_
WORKAROUND:
For those who need file locking to be working before the developers have released a fix:
Set FILE_LOCKING to "yes" in /etc/openoffice
Version Information:
> lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
> apt-cache policy openoffice.org
openoffice.org:
Installed: 1:2.4.0-3ubuntu6
Candidate: 1:2.4.0-3ubuntu6
Version table:
*** 1:2.4.0-3ubuntu6 0
Changed in openoffice.org: | |
assignee: | nobody → ccheney |
status: | New → In Progress |
Changed in openoffice.org: | |
status: | In Progress → Triaged |
status: | In Progress → Fix Committed |
Thanks for the patch, it will be in the next upload to hardy-proposed and will should make it into intrepid soon as well.
Chris Cheney