Bug 105623 - OpenOffice wrapper script (/usr/bin/ooffice) contains errors
Summary: OpenOffice wrapper script (/usr/bin/ooffice) contains errors
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openoffice.org
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-26 03:01 UTC by Dale R. Worley
Modified: 2005-10-31 22:00 UTC (History)
0 users

Clone Of:
Last Closed: 2004-02-05 03:14:20 UTC

Attachments (Terms of Use)

Description Dale R. Worley 2003-09-26 03:01:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716

Description of problem:
The OpenOffice start-up wrapper script (/usr/bin/ooffice) contains various errors.

1. Upon startup, ooffice seems to look for information regarding version
$OOVERSION of OpenOffice in $HOME/.sversionrc.  However, the script sets
$OOVERSION to be "641", whereas whatever part of OpenOffice adds the entry to
.sversionrc seems to use version number "1.0.1", as can be seen by the contents
of my .sversionrc:

    OpenOffice.org 1.0.1=file:///home/worley/.openoffice

The result of this is that the test at line 14 of ooffice will always be false
(since $oohome will always be empty).  I do not know the significance of this,
but it is probably not what you want.

2. In several places, uses of "." in regular expressions are not quoted when
they refer to literal periods and not to "any single character":

Line 13: perl -n -e "m|^OpenOffice.org ${OOVERSION}=file://(.*)$| and print \$1")

The "." in "OpenOffice.org" should be escaped with \\.  (Perl needs to see "\"
before ".", but since it is in a shell double-quote string, "\" is represented
by "\\".)  The use of ${OOVERSION} needs to be protected with the Perl \Q-\E
mechanism which operates in patterns as it does in double-quoted strings.  I
think this is what is needed:

    perl -n -e "m|^OpenOffice\\.org \\Q${OOVERSION}\\E=file://(.*)$| and print \$1")

Lines 26, 28-43:

Multiple occurrences of grep/sed patterns containing "." that should be
represented as "\." (since they appear in single-quoted strings).

Version-Release number of selected component (if applicable):
1.0.1 (appears to have internal version number 641)

How reproducible:

Steps to Reproduce:
1. Read /usr/bin/ooffice.

Additional info:

Comment 1 Dale R. Worley 2003-09-26 18:52:44 UTC
In the version of /usr/bin/ooffice in openoffice-1.0.2-4.i386.rpm from RH 9, the
value of $OOVERSION is what it (probably) should be, "1.0.2".  So it looks like
item 1. has been fixed in RH 9.

Note You need to log in before you can comment on or make changes to this bug.