Closed
Bug 312670
Opened 19 years ago
Closed 19 years ago
Software update does not set updates.xml correctly after successful install
Categories
(Toolkit :: Application Update, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bent.mozilla, Assigned: darin.moz)
References
Details
(Keywords: fixed1.8)
Attachments
(4 files, 2 obsolete files)
2.47 KB,
patch
|
darin.moz
:
review+
asa
:
approval1.8rc1+
|
Details | Diff | Splinter Review |
26.66 KB,
image/pjpeg
|
Details | |
16.79 KB,
image/png
|
Details | |
816 bytes,
patch
|
darin.moz
:
review+
mscott
:
approval1.8rc1+
|
Details | Diff | Splinter Review |
Split from bug 310362. This will deal with fixing the UpdateManager to accurately report install success (so that the update history will display correctly).
Reporter | ||
Comment 1•19 years ago
|
||
This patch correctly writes the 'statusText' attribute in updates.xml when a patch is successfully installed. It's not very elegant, but it was the best of all the hacks I tried. The basic problem is that we were changing the statusText of the activeUpdate, but then we were turning around and deleting the activeUpdate (because the install was successful) so the new statusText was getting lost. This patch works by iterating through the updates.xml database directly and correcting the statusText for the appropriate update. It uses the same matching criteria as UpdateManager's _addUpdate function. Ideally there would be more connection between the activeUpdate and the internal array of updates that is maintained by the UpdateManager... Right now, changing an attribute on the activeUpdate causes no change to the internal array. Is this by-design behavior?
Reporter | ||
Updated•19 years ago
|
Attachment #199780 -
Flags: review?(darin)
Updated•19 years ago
|
Flags: blocking1.8rc1+
Assignee | ||
Comment 2•19 years ago
|
||
Comment on attachment 199780 [details] [diff] [review] patch >+ // Dig through the update history to find the patch that was just >+ // installed and update its metadata. >+ for (var i = 0; i < um.updateCount; ++i) { >+ var umUpdate = um.getUpdateAt(i); >+ if (umUpdate) { >+ if (umUpdate.version == update.version && >+ umUpdate.buildID == update.buildID) { >+ umUpdate.statusText = update.statusText; >+ break; >+ } >+ } >+ } >+ Do we have to worry about the case where the update is not found? Also, are updates being published with BuildIDs now?
Reporter | ||
Comment 3•19 years ago
|
||
Wow, I completely forgot about what might happen if the update wasn't found... I'll look into it. About the buildID, see bug 310362, comment 10. Chase says that updates will ship with the buildID tag probably before the next release.
Reporter | ||
Comment 4•19 years ago
|
||
The case where our active update isn't found in the updates.xml file should be pretty hard to reach. However, this patch guarantees that the active update will *always* be in the updates.xml file. Thanks for pointing that out, Darin.
Attachment #199780 -
Attachment is obsolete: true
Attachment #199856 -
Flags: review?(darin)
Reporter | ||
Updated•19 years ago
|
Attachment #199780 -
Flags: review?(darin)
Updated•19 years ago
|
Whiteboard: [needs review darin]
Assignee | ||
Comment 5•19 years ago
|
||
This patch sort of depends on AUS sending us a BuildID. The patch looks good to me, but I have just a small tweak that I'd like to make. Posting a revised patch shortly.
Assignee | ||
Comment 6•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #199856 -
Attachment is obsolete: true
Attachment #200305 -
Flags: review+
Attachment #200305 -
Flags: approval1.8rc1?
Assignee | ||
Comment 7•19 years ago
|
||
Reassigning this bug to myself for easier tracking.
Assignee: nobody → darin
Assignee | ||
Comment 8•19 years ago
|
||
fixed-on-trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•19 years ago
|
Attachment #199856 -
Flags: review?(darin)
Updated•19 years ago
|
Attachment #200305 -
Flags: approval1.8rc1? → approval1.8rc1+
Updated•19 years ago
|
Whiteboard: [needs review darin] → [needs 1.8 branch landing]
Reporter | ||
Comment 9•19 years ago
|
||
Some folks have reported that this bug still exitst in the trunk build (see bug 310362). I'll check into it later today.
Reporter | ||
Comment 10•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051022 Firefox/1.6a1 WORKSFORME
Comment 11•19 years ago
|
||
We need to get this into the branch before tonight's deadline.
Comment 13•19 years ago
|
||
Updating from 2005102503 (first nightly) to 2005102510 (respin) still results in an "install pending" status. I'm using Windows XP, but I know it also occurs on Linux. I believe this bug should be reopened.
Comment 14•19 years ago
|
||
I can confirm the previous comment. And i think this bug should be reopened!
Assignee | ||
Comment 15•19 years ago
|
||
bent: can you take another look at this?
Comment 16•19 years ago
|
||
If this "feature" is going to be so buggy we could just remove it. In retrospect I don't really see a use for a user-visible update history... people just need to know what version they're on now and they get that from the About box. Also, the updates.xml file shows a full history anyway for debugging purposes. bent - what do you think?
Comment 17•19 years ago
|
||
(In reply to comment #16) > I don't really see a use for a user-visible update history... We may run into an app or an update problem in the field that is dependent on a particular set of updates being run in sequence. If that were to happen and the update history is unavailable, we wouldn't be able to use the app's update history to tell us how it got into its current state. That's an important debugging capability, IMO. Whether it's user-visible or not is not as important, but I suspect this bug is damaging the user-invisible portions of the update history, too.
Reporter | ||
Comment 18•19 years ago
|
||
The problem definitely still exists in the nightlies, but I can't reproduce it with a fresh (late last night) debug build... I'm on it. Should have something in an hour or so.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 19•19 years ago
|
||
Ok, the problem is coming from somewhere else now. I added some dump statements and got this: *** UpdateService:_postUpdateProcessing: umUpdate.version = 1.5 *** UpdateService:_postUpdateProcessing: update.version = undefined *** UpdateService:_postUpdateProcessing: umUpdate.buildID = 2005102422 *** UpdateService:_postUpdateProcessing: update.buildID = undefined The update variable is set from the active-update.xml file. So somehow we're breaking down between reading the file and setting those attributes. I'll keep looking... Maybe this is blowback from bug 311613, patch v2?
Reporter | ||
Comment 20•19 years ago
|
||
Yeah, I'm pretty sure that's it. We used to have that static properties list for all update vars, but now they're all independent. There's no code to read active-update.xml at all! Patch coming up.
Reporter | ||
Comment 21•19 years ago
|
||
Ok, so ignore my last comment. I'll explain this in a sec.
Attachment #200817 -
Flags: review?(darin)
Comment 22•19 years ago
|
||
You should remove the fixed1.8 keyword if this isn't properly fixed on the branch.
Keywords: fixed1.8
Reporter | ||
Comment 23•19 years ago
|
||
Ok, so I was totally wrong in comment #20. What's actually happening is that UpdateManager is clearing _activeUpdate in the the public getter for activeUpdate. It's doing this because the serviceURL prop of the update no longer matches the default serviceURL for the Checker component because it's buildID has changed! This check was added to catch the case where a user changes the update channel, but it's screwing us in this case. Patch v2 is just a workaround for the case in which we're sure we have an update that just succeeded and has therefore changed the default updateURL. And thanks for fixing the flags Gavin.
Whiteboard: [needs 1.8 branch landing]
Reporter | ||
Comment 24•19 years ago
|
||
The reason that it kept working for me (and I assume most folks testing these kinds of patches) is that the default serviceURL is set to whatever is in app.update.url.override (if it exists).
Assignee | ||
Comment 25•19 years ago
|
||
The correct solution here is to fix the activeUpdate getter to not destroy the updates dir and active-update.xml file when the serviceURL changes. Instead, it should only check to see if the channel changed. Given the release schedule, though, I think it's reasonable to take the latest patch as a workaround since I have too many uncertainties about what changing the activeUpdate getter might also do.
Assignee | ||
Comment 26•19 years ago
|
||
Comment on attachment 200817 [details] [diff] [review] update history patch v2.0 looks good, i'm testing this now.
Attachment #200817 -
Flags: review?(darin) → review+
Comment 27•19 years ago
|
||
Comment on attachment 200817 [details] [diff] [review] update history patch v2.0 a=me and chase Darin is reviewing and testing it right now.
Attachment #200817 -
Flags: review?(darin)
Attachment #200817 -
Flags: review+
Attachment #200817 -
Flags: approval1.8rc1+
Comment 28•19 years ago
|
||
a=asa as well on the 10/25 patch
Assignee | ||
Comment 29•19 years ago
|
||
Comment on attachment 200817 [details] [diff] [review] update history patch v2.0 looks good. passed my tests.
Attachment #200817 -
Flags: review?(darin) → review+
Assignee | ||
Comment 30•19 years ago
|
||
fixed-on-trunk, fixed1.8
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Assignee | ||
Comment 31•19 years ago
|
||
I filed bug 313830 about fixing this properly after FF 1.5
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•