Closed Bug 326722 Opened 18 years ago Closed 18 years ago

On upgrade cleanup cruft from bug 319022

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1alpha1

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

References

Details

(Keywords: fixed1.8.1)

Attachments

(2 files, 2 obsolete files)

There are several bugs that leave garbage data in the extensions datasource... specifically bug 319022 left download entries. Instead of checking / cleaning on each load, unload, or some other event I think it would be best to cleanup on upgrade in a similar manner as we currently migrate a 1.0 extensions datasource to the 1.5 extensions datasource. This way we won't cover up bugs that should be fixed and provide a clean slate for finding these bugs.
Mel, you brought up this bug to me once before and if you have the time I'd appreciate your help with verifying this is working as expected, etc. when it is patched.
Target Milestone: --- → Firefox 2 alpha2
Depends on: 319022
This should also handle the case where there is a download item that is no longer in :mozilla:item:root sequence. These items don't show up in the EM ui but they are part of the "cruft" left behind and aren't used for anything at this point so are safe to remove.
Attached patch patch (obsolete) — Splinter Review
I'm curious if there are other cases that need to be handled than the ones in the sample extensions.rdf... if anyone has cases not already handled (see below) please let me know in this bug by attaching an extensions.rdf with it in it.

This patch cleans up the attached sample and removes items that
* have a value for state
* have a value for downloadURL
* don't have a value for installLocation and the value of appDisabled is "true"

I'm going to wait a couple of days to request review so I can go through all of the extensions.rdf files I have received and give people a chance to attach new samples.
Attached patch patch (obsolete) — Splinter Review
Benjamin, I'd like to get this in for the app version change that mscott will be doing in the next couple of days.  By cleaning up the extensions datasource on upgrade we will be able to lessen bug reports for pre-existing bugs that have been patched. I would also need the patch from bug 319022 to land on the branch as well and I would like to get the patch in bug 324314 landed as well since it only takes affect on app upgrade as well.
Attachment #212071 - Attachment is obsolete: true
Attachment #212138 - Flags: review?(benjamin)
Comment on attachment 212138 [details] [diff] [review]
patch

bah... forgot one other change.
Attachment #212138 - Flags: review?(benjamin)
Attached patch patchSplinter Review
Benjamin, see comment #5

I moved the closing of the zip reader since we close it on failure in getZipReaderForFile and I also added a check for there being a directory in the chrome dir for flat file structures... I ran into this while debugging.
Attachment #212138 - Attachment is obsolete: true
Attachment #212140 - Flags: review?(benjamin)
Attachment #212140 - Flags: review?(benjamin) → review+
Comment on attachment 212140 [details] [diff] [review]
patch

I need this on the MOZILLA_1_8_BRANCH for the upcoming app version change
Attachment #212140 - Flags: approval-branch-1.8.1+
Fixed on trunk and MOZILLA_1_8_BRANCH
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Thanks for getting this landed Rob. I might wait a little bit on the version change until we fix software update for nightly users: Bug 327140. I believe I need to make some AUS changes to account for the new version string and I'd like to wait until I know software update is working again.
(In reply to comment #4)
> 
> I'm going to wait a couple of days to request review so I can go through all of
> the extensions.rdf files I have received and give people a chance to attach new
> samples.
> 
One such file is in bug 318169.
This patch removes the cruft left behind in the extensions.rdf that is attached to bug 318169.
Target Milestone: Firefox 2 alpha2 → Firefox 2 alpha1
Note: this patch will only cleanup the cruft during an application upgrade where the version changes and this will be happening soon after mscott changes the version.
I couldn't ask for better timing, yesterday i was testing the rebuilding of the extensions.rdf by backing it up and seeing the difference after reinstalling and cleaning things up.  Granted I probably install/uninstall more extensions the any normal user, but I'm sure there are folks out there that will benefit from this beaut.

With my extensions.rdf rebuild found some weird things but none that couldn't be resolved as they were probably caused by the "make compatible" features, etc. but I did notice a drop from anywheres from 5 to 15k in file size from the origional of 60-80k total, I'll backup my files and see if I notice any size differences when the app bump comes up.
Mel, if you'd like to force this to run the code just modify the LastVersion line in the profiles compatibility.ini
Sample
LastVersion=1.5_2006021610/1.8_2006021610
change it to
LastVersion=1.4_2006021610/1.8_2006021610

and modify the following in prefs.js
user_pref("extensions.lastAppVersion", "1.5");
change it to
user_pref("extensions.lastAppVersion", "1.4");

btw: do this while the app isn't running and the run the app... the changes don't have to be exactly like the examples.
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: