Closed Bug 307798 Opened 19 years ago Closed 15 years ago

1.5b1 looks for -bin file based on symlink name, not symlink target's name.

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: charlesduffy, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

Symlink exists as follows:
/pkgs/mozilla/bin/firefox-1.5b1 -> ../firefox-1.5b1/firefox

$ /pkgs/mozilla/bin/firefox-1.5b1
run-mozilla.sh: Cannot execute /pkgs/mozilla/firefox-1.5b1/firefox-1.5b1-bin

The intended -bin file is /pkgs/mozilla/firefox-1.5b1/firefox-bin, without the
-1.5b1- present in the filename itself (as opposed to the path). Released
versions of both Firefox and Mozilla do not have this issue -- making a symlink
named by the version of the browser being invoked works correctly, without
requiring one to also modify the browser directory to have a new -bin file.

The following patch (which is certainly not portable enough for inclusion)
solves the problem for me:

--- firefox~    2005-09-08 08:18:33.265535512 -0500
+++ firefox     2005-09-09 15:53:53.743766154 -0500
@@ -99,6 +99,11 @@
 # If not, then start resolving symlinks until we find run-mozilla.sh
 found=0
 progname="$0"
+
+if [ -L "$progname" ] ; then
+       progname=`readlink -f $progname`
+fi
+
 curdir=`dirname "$progname"`
 progbase=`basename "$progname"`
 run_moz="$curdir/run-mozilla.sh"

Reproducible: Always

Steps to Reproduce:
1. Create a symlink to the "firefox" launcher script with a name other than
"firefox"; say, "firefox-beta".
2. Attempt to invoke Firefox via the symlink.


Actual Results:  
Launch script tries and fails to find an application binary with its name based
on the symlink itself, rather than the symlink's target

Expected Results:  
Launch script should have looked for a -bin file based on the target of the
symlink, rather than the name of the symlink itself.
This involves the same logic as bug#57866, though I think it's different enough
to be a distinguishably different bug -- firefox *does* start from symlinks, but
only if those symlinks have the same name as the script they link to.
This is an annoying problem propagated in firefox v2. We want to run two firefoxs on our machines. firefox starts firefox 1.5 and firefox2 starts firefox2. These are symlinks to the firefox scripts in the main directory. If I run firefox2 it tries to look for firefox2-bin. The easy fix is to make another symlink in the firefox directory from firefox2-bin to firefox-bin or just mv firefox-bin to firefox2-bin
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
http://www.mozilla.com
http://support.mozilla.com/kb/Managing+profiles
http://support.mozilla.com/kb/Safe+mode
Version: unspecified → 1.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
You need to log in before you can comment on or make changes to this bug.