Closed Bug 486275 Opened 16 years ago Closed 16 years ago

active-update.xml is not saved after a channel change which leaves behind cruft

Categories

(Toolkit :: Application Update, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

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

References

Details

Attachments

(1 file, 8 obsolete files)

Found while working on bug 485624
Depends on: 485624
Attachment #370371 - Flags: review?(dtownsend)
Attachment #370371 - Attachment description: patch w/ tests rev1 → patch w/ tests rev1 (requires patches from bug 485624)
Comment on attachment 370371 [details] [diff] [review] patch w/ tests rev1 (requires patches from bug 485624) >diff --git a/toolkit/mozapps/update/test/unit/test_0063_Manager_local_xml.js b/toolkit/mozapps/update/test/unit/test_0063_Manager_local_xml.js >new file mode 100644 >--- /dev/null >+++ b/toolkit/mozapps/update/test/unit/test_0063_Manager_local_xml.js Please consider these fixed in my repo >+ dump("Testing: verifying contents of " + FILE_UPDATE_ACTIVE "\n"); should be >+ dump("Testing: verifying contents of " + FILE_UPDATE_ACTIVE + "\n"); and >+ dump("Testing: verifying contents of " + FILE_UPDATES_DB "\n"); should be should be >+ dump("Testing: verifying contents of " + FILE_UPDATES_DB + "\n");
Attachment #370371 - Attachment is obsolete: true
Attachment #370373 - Flags: review?(dtownsend)
Attachment #370371 - Flags: review?(dtownsend)
Comment on attachment 370373 [details] [diff] [review] patch w/ tests rev2 (requires patches from bug 485624) bah... this also existing overwrites the update history.
Attachment #370373 - Attachment is obsolete: true
Attachment #370373 - Flags: review?(dtownsend)
this should do it
Attachment #370376 - Flags: review?(dtownsend)
Comment on attachment 370376 [details] [diff] [review] patch w/ tests rev3 (requires patches from bug 487346) >--- a/toolkit/mozapps/update/test/unit/head_update.js >+++ b/toolkit/mozapps/update/test/unit/head_update.js >... >@@ -402,6 +402,31 @@ function closeSafeOutputStream(fos) { > fos.close(); > } > >+function readUpdateXMLFile(fileName) { >+ var fileLocator = AUS_Cc["@mozilla.org/file/directory_service;1"] >+ .getService(AUS_Ci.nsIProperties); >+ var dir = fileLocator.get("GreD", AUS_Ci.nsIFile); >+ >+ var file = dir.clone(); The above 3 vars are replaced by the following with the changes I've made in bug 487346 var file = gNewGreD.clone(); >+function readFile(file) { >+ var fis = AUS_Cc["@mozilla.org/network/file-input-stream;1"] >+ .createInstance(AUS_Ci.nsIFileInputStream); >+ var modeFlags = MODE_RDONLY; >+ if (!file.exists()) >+ return null; >+ fis.init(file, modeFlags, PERMS_FILE, 0); I changed this to just use MODE_RDONLY instead of the var Other than that it is good to go
Attachment #370376 - Attachment description: patch w/ tests rev3 (requires patches from bug 485624) → patch w/ tests rev3 (requires patches from bug 487346)
Attachment #370376 - Attachment is obsolete: true
Attachment #373023 - Flags: review?(dtownsend)
Attachment #370376 - Flags: review?(dtownsend)
missed a file :(
Attachment #373023 - Attachment is obsolete: true
Attachment #373025 - Flags: review?(dtownsend)
Attachment #373023 - Flags: review?(dtownsend)
Attached patch patch rev5 remove bitrot again (obsolete) (deleted) — Splinter Review
Attachment #373025 - Attachment is obsolete: true
Attachment #373160 - Flags: review?(dtownsend)
Attachment #373025 - Flags: review?(dtownsend)
gonna hold off on requesting review until after bug 488797 is fixed
Attachment #373160 - Attachment is obsolete: true
Attachment #373160 - Flags: review?(dtownsend)
Attached patch patch rev7 - remove bitrot (obsolete) (deleted) — Splinter Review
Attachment #373279 - Attachment is obsolete: true
Attachment #377740 - Flags: review?(dtownsend)
Attachment #377740 - Flags: review?(dtownsend) → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-litmus+
Resolution: --- → FIXED
Attachment #377740 - Attachment is obsolete: true
Attachment #378422 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: