Closed Bug 448504 Opened 16 years ago Closed 16 years ago

Upgrade to FF3 and minor upgrades of FF3 cause all.js to be overwritten

Categories

(Toolkit :: Application Update, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jpuddy, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

In Firefox 2 you could upgrade minor versions and the all.js file would be kept intact. In the upgrade to 3, and in the minor upgrades since 3 came out, the all.js (in greprefs) has been overwritten every time an upgrade is performed. This is particularly troubling for enterprise users who customize the all.js file for the purposes of specifying a mozilla.cfg file to lock user preferences, proxy settings, etc.

Reproducible: Always

Steps to Reproduce:
1. Using any non-current version, establish a custom line in the /greprefs/all.js
2. Upgrade to the current version of Firefox

Actual Results:  
Check the /greprefs/all.js file again, and your customization will be gone. This is a problem for users that need to have a proxy configured, as the mandatory settings enforced by the all.js file will now be removed. An admin would have to be keenly aware each time Firefox auto-updated, and would have to customise the all.js file each time.

Expected Results:  
The customization should have been kept intact. This was the behavior in Firefox 2, and is the better behavior in any case.

Using a vanilla Firefox 3 install, nothing fancy except the use of a mozilla.cfg file for locking preferences, and then referencing that file in all.js (as described in many places, including here: http://kb.mozillazine.org/Locking_preferences)
I think the technique described on the Mozillazine knowledgebase is not best practice.

all.js will be updated each time its contents change, which happened to occur between 3.0 and 3.0.1 for bug 424626. This list of changes (http://tinyurl.com/68mhgl) indicates that all.js did change several times for 2.0.0.x, most recently between 2.0.0.11 and 2.0.0.12.

To proceed in a safe way, the updater does a CRC check on each file before applying a patch, so modifications make this fail. The updater then fails over to a complete update, which replaces all.js with the stock file (as it does for everything else). Which explains the problem you report.

A much better way to achieve configuration locking is to create a *new* file in <install_dir>/greprefs/ or <install dir>/default/pref/, so long as the name is different from the files shipped with firefox and ends in .js, then add the pref("general.config.filename",..) line to that. This file won't be touched by the updater, and Mozilla apps will read all the files in this directory on startup. I'll update the wiki article.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Slight correction - <install dir>/defaults/pref/ rather than .../default/...
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.