Issue 10342 - setup script improvement
Summary: setup script improvement
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: Other Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 1.1 Beta
Assignee: nospam4obr
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-29 13:56 UTC by Unknown
Modified: 2003-11-23 11:39 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
apply this to your setup.sh file or to setup2/script/setup2 with patch -i this.patch.file (791 bytes, patch)
2003-01-06 11:31 UTC, foskey
no flags Details | Diff
Revised patch based upon comments from the mailing list. (817 bytes, patch)
2003-01-31 14:20 UTC, foskey
no flags Details | Diff
Sorry missed the "0" fix.. (911 bytes, patch)
2003-01-31 14:22 UTC, foskey
no flags Details | Diff
complete I fixed this on the wrong tree, too many version of my HardDisk (1.07 KB, patch)
2003-02-03 10:42 UTC, foskey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-12-29 13:56:04 UTC
The 'setup' shell script attempts to locate the 'test' binary by executing 
'uname -s' and then guessing the location based on the result and some 
a-priori knowledge about where it is 'supposed to be' installed. This is an 
awkward procedure and in fact fails on my system, which is running Linux and 
has the 'test' binary installed as '/bin/test' (and, btw., I am using a BASH 
shell which happens to have a builtin 'test' command). I think instead of 
trying to make this kind of pseudo-smart guess it would be much more 
appropriate to just rely on the user having set up a sensible value for the 
PATH variable. I therefore suggest to run 'which test' first and use 
'test=test' if it succeeds. Or, if this is not acceptable for some reason, I 
suggest replacing the default branch of the case statement, which now reads 
'test=/usr/bin/test' with a plain 'test=test'.
Comment 1 Olaf Felka 2003-01-06 09:55:20 UTC
Please have a look
Comment 2 foskey 2003-01-06 11:00:09 UTC
Accept this issue will create a patch.
Comment 3 foskey 2003-01-06 11:31:18 UTC
Created attachment 4217 [details]
apply this to your setup.sh file or to setup2/script/setup2 with patch -i this.patch.file
Comment 4 foskey 2003-01-06 11:35:26 UTC
This script appears a little strange.  We go to all the bother of
defining a 'test' command that configure just 'assumes' present and
then we use '[' which autobook tells us is not nessecarily
implemented.  It also suggests that there is about four options that
are guaranteed to work in and -L is not one of them (page 273-275 gnu
automake book).

I have therefore simply moved the script to use '[' like the rest of
the script and got rid of the 'test' setup at all.

There are a few more portability problems like the fact we do not set
LD_LIBRARY_PATH at all if we do not recognise the particular platform.
Comment 5 foskey 2003-01-31 14:20:02 UTC
Created attachment 4517 [details]
Revised patch based upon comments from the mailing list.
Comment 6 foskey 2003-01-31 14:22:05 UTC
Created attachment 4518 [details]
Sorry missed the "0" fix..
Comment 7 nospam4obr 2003-02-03 09:49:03 UTC
Hi Ken,

your patch removes the variable that save the current working
directory, but I thought the outcome of our discussion was to do "cd
$sd_cwd" to restore the original working directory before actually
starting setup.bin (see soffice.sh in project sysui).

The rest of the patch looks good though ..
Comment 8 foskey 2003-02-03 10:42:40 UTC
Created attachment 4544 [details]
complete I fixed this on the wrong tree, too many version of my HardDisk
Comment 9 nospam4obr 2003-02-04 09:52:27 UTC
Hi Ken,

as I already wrote to the porting list, we have to revert the cd
$sd_cwd change because it causes setup to fail during initial
installation process.

also I can't approve the revision of setup.sh you derived your patch
from for use in StarOffice, because

a) the -L switch doesn't work with solaris sh (suggest to use -h instead)
b) there are two occurances of '==' which also don't work on solaris
and should IMHO be replaced by '='

Having the same revision in OOo and SO would ensure that contributed
changes won't get lost anymore when switching to a new branch, so it
may be worth to create a version of the script that suits both.

Also it seems to me that making LD_LIBRARY_PATH the default switch
argument would be a good idea, enumerating just the unix flavors that
need something else. What do you think ?
Comment 10 philipp.lohmann 2003-02-05 09:56:56 UTC
i will take care of the -h issue as well as the LD_LIBRARY_PATH
Comment 11 philipp.lohmann 2003-02-05 09:57:24 UTC
changes should go into CWS vcl04
Comment 12 philipp.lohmann 2003-02-05 17:45:02 UTC
pl->obr: fixed in vcl04
Comment 13 nospam4obr 2003-02-06 15:53:22 UTC
Damn stupid task handling ..
Comment 14 nospam4obr 2003-02-06 15:54:39 UTC
Works fins on Solaris sparc & Linux x86
Comment 15 michael.bemmer 2003-03-13 11:09:40 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.