Closed Bug 57733 Opened 24 years ago Closed 24 years ago

Add-on packages don't work with Netscape 6

Categories

(Core :: XUL, defect, P2)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: hyatt, Assigned: hyatt)

References

Details

(Whiteboard: [rtm++])

Attachments

(2 files)

There is a bug in the chrome registry that prevents add-on packages (e.g.,
chatzilla) from installing properly.  The auto-skin selection code is broken.

The patch is one-line, and of enormous benefit, since otherwise, all add-ons
produced for Netscape 6 will be broken.
Nominating for rtm.
Keywords: rtm
*** Bug 51187 has been marked as a duplicate of this bug. ***
tested patch on linux.  r=rginda
rtm need info
Priority: P3 → P2
Whiteboard: [rtm need info]
Target Milestone: --- → M18
Patch wasn't quite one line (could be smaller though: why not

+        PRBool useProfile = !mProfileRoot.IsEmpty();

rather than the longer, optimizer-needs-to-avoid-double-set-in-true-case:

+        PRBool useProfile = PR_FALSE;
+        if (!mProfileRoot.IsEmpty())
+          useProfile = PR_TRUE;

?)

What was the one-line part?  Both parts look important, but could you say a few 
more words (for the PDT as well as for me)?  I'm happy to give sr= soon.

/be
Also, we need QA coverage here, unless this was a very recent regression.  
What's our QA story?

/be
The one-liner caused us to bail early while walking through a loop of installed 
skins.  The idea is that chatzilla has no skin selected yet.  It only supplies 
a skin for modern.  The code is walking the list of skins until it finds one 
that chatzilla supports.

In a situation where classic comes first (which is the way it is for 
everybody), I end up not checking modern, since I mistakenly bail because I 
checked the wrong thing (I checked the address rather than the value).

The other code, the useProfile thing, will prevent packages from being 
installed on Linux where the user isn't running as root.  I was trying to write 
to the install dir, when if the profile root is known, I can just write to thep 
rofile dir instead.
Status: NEW → ASSIGNED
sr=brendan (a=, same thing I think).  I took the liberty of setting [rtm+].

/be
Whiteboard: [rtm need info] → [rtm+]
Back to need info.  We still don't see a one-line patch.
Whiteboard: [rtm+] → [rtm need info]
Hey, hyatt explained why the patch was more than one line.  His "one-line" was 
wrong.  You can't expect a one-line patch for this bug, given my understanding 
of the code problems being addressed.

/be
Whiteboard: [rtm need info] → [rtm+]
Really, this is very simple - even I can understand it!  It could be written in
fewer lines, but that wouldn't make it simpler, just less clear.
OS: Windows 2000 → All
Hardware: PC → All
Cc'ing selmer so he can react to our frustration.

/be
So, the smallest possible fix would be the change from
  if (aSelectedProvider)
to
  if (*aSelectedProvider)
and that would avoid the bailing out too early problem.  Is this not a correct
fix all by itself?

The rest of the patch seems to address a different bug that non-root users can't
install packages if root installed to an unwritable directory.  Would not fixing
this have any impact on the bailing out problem?  Will taking this part of the
fix cause users running as root to always install packages into their own
profile directory?  (There doesn't appear to be a way of choosing.)
Whiteboard: [rtm+] → [rtm need info]
It's two one-liners (for a total of two lines).  I have made the adjustment
brendan suggested, so now the patch is two lines.

Note that depending on how you install on Linux, this can even cause the browser
to not start.  If you - this, there will definitely have to be a release note
entry about how lame we are at installation on shared networks.
Whiteboard: [rtm need info] → [rtm+]
The bug is that chatzilla doesn't start.  Even if you fix the first problem,
then you get bitten by the second.  I could break it out if you want, but what
I'm showing you are two one-line patches that address the same problem.
We would like to see this have some focused testing about packages that work on 
mozilla vs N6 and install as root/non-root.  We spoke with Peter and he knows 
what is required.
Whiteboard: [rtm+] → [rtm need info]
Whiteboard: [rtm need info] → [rtm+]
Hyatt plans to land this on the trunk this evening, and jrgm will take tonight's
verification builds and start testing those permutations.
Oops, forgot to mark need info until the testing is done.
Whiteboard: [rtm+] → [rtm need info]
Checked in on trunk.
Ran the Netscape6 trunk installer on Linux/win/mac with successful installs,
on systems scrubbed of any prior profiles/registry info. Started mail,
composer, browser, addressbook, AIM, and their respective overlays were in
place.

Added 'button {border:1px solid red !important}' to
<profile>/chrome/userChrome.css and had that reflected in the UI. Deleted
*.rdf and overlayinfo, and saw that they were rebuilt. Touched
installed-chrome.txt and saw that chrome was reregistered (by
timestamps). Delete ./chrome from <profile> and had it rebuilt with
user-skins.rdf and user-locale.rdf.

Ran the Mozilla trunk installer on Linux/win/mac with successful installs, on
systems scrubbed of any prior profiles/registry info.

Mozilla builds, came up with Chatzilla fully functioning (AFAICT), with all
overlays in place.

So: that all looks perfectly fine.

One caveat though: if there is only one profile on the system (i.e., don't
need to run profilemanger), then user-*.rdf will not be rewritten into the
install directory.  However, if there are 2+ profiles (i.e., profilemanager
runs to select the profile), then user-*.rdf will be rewritten again into the
install directory. hyatt needs to ensure that this information is available
in either case.
Attached patch New patch.Splinter Review
Ok, this is ready to go.
Whiteboard: [rtm need info] → [rtm+]
Whiteboard: [rtm+] → [rtm+] FIXED ON TRUNK
This bug is in candidate limbo.  We will reconsider this fix once we have a 
candidate in hand, but we can't take this fix before then.  Please check into 
the trunk ASAP.
r= & sr= are done per Dave's comments at the meeting.
rtm++, please checkin ASAP so we can build today.
Whiteboard: [rtm+] FIXED ON TRUNK → [rtm++] FIXED ON TRUNK
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [rtm++] FIXED ON TRUNK → [rtm++]
I've verified the chatzilla aspect of this patch. I'm through most of the
other stuff, but have a couple of items left. (But, right now, I am going
home ...)
running through the items noted 10/25, mac/linux/win32 with 20001109nn MN6
candidate commercial builds, everything checks out, including the placement
of a backup user-skins.rdf/user-locale.rdf to enable profile selection.
Marking vtrunk.
Keywords: vtrunk
Folks: 

In working on 44070 (matching browser locale with system locale), I plan to 
change the ProfileCreation code to not auto select/set profile locale when
users do not explicitly choose one via locale selector. This would save us
a 'write' to disk and subsequent reads in startup.

Unfortunately, this patch results in a 'write' to disk in finding each
skin/locale providers (except gloal and communicator) and subsequent read to 
chrome.rdf in profile directory. Is this really necessary? Could we set a flag
such as mRuntimeProvider to avoid writing to global and profile directory. 
See my patch in 44070.

Keywords: vtrunk
Adding Conrad and Bhuvan to answer your profile question.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: