diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index d41502a03dd9..a6bd612f4f71 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -8872,8 +8872,8 @@ function restoreLastSession() { var TabContextMenu = { contextTab: null, updateContextMenu: function updateContextMenu(aPopupMenu) { - this.contextTab = document.popupNode.localName == "tab" ? - document.popupNode : gBrowser.selectedTab; + this.contextTab = aPopupMenu.triggerNode.localName == "tab" ? + aPopupMenu.triggerNode : gBrowser.selectedTab; let disabled = gBrowser.tabs.length == 1; // Enable the "Close Tab" menuitem when the window doesn't close with the last tab. diff --git a/browser/base/content/test/Makefile.in b/browser/base/content/test/Makefile.in index a95866c6cd41..afcea719fa99 100644 --- a/browser/base/content/test/Makefile.in +++ b/browser/base/content/test/Makefile.in @@ -83,7 +83,7 @@ endif # browser_sanitize-download-history.js is bug 432425 # # browser_sanitizeDialog_treeView.js is disabled until the tree view is added -# back to the clear recent history dialog (santize.xul), if it ever is (bug +# back to the clear recent history dialog (sanitize.xul), if it ever is (bug # 480169) # browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638. @@ -91,6 +91,7 @@ endif # browser_bug321000.js is disabled because newline handling is shaky (bug 592528) _BROWSER_FILES = \ + head.js \ browser_typeAheadFind.js \ browser_keywordSearch.js \ browser_allTabsPanel.js \ diff --git a/browser/base/content/test/browser_bug580956.js b/browser/base/content/test/browser_bug580956.js index fc26754785cb..f7cc3c3fe1bc 100644 --- a/browser/base/content/test/browser_bug580956.js +++ b/browser/base/content/test/browser_bug580956.js @@ -4,9 +4,7 @@ function numClosedTabs() getClosedTabCount(window); function isUndoCloseEnabled() { - document.popupNode = gBrowser.tabs[0]; - TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu")); - TabContextMenu.contextTab = null; + updateTabContextMenu(); return !document.getElementById("context_undoCloseTab").disabled; } diff --git a/browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js b/browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js index 93715d764580..82c610a638ae 100644 --- a/browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js +++ b/browser/base/content/test/browser_visibleTabs_bookmarkAllTabs.js @@ -89,15 +89,11 @@ function test() { } function Disabled() { - document.popupNode = gBrowser.selectedTab; - TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu")); - TabContextMenu.contextTab = null; + updateTabContextMenu(); return document.getElementById("Browser:BookmarkAllTabs").getAttribute("disabled") == "true"; } function Hidden() { - document.popupNode = gBrowser.selectedTab; - TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu")); - TabContextMenu.contextTab = null; + updateTabContextMenu(); return document.getElementById("context_bookmarkAllTabs").hidden; } diff --git a/browser/base/content/test/browser_visibleTabs_contextMenu.js b/browser/base/content/test/browser_visibleTabs_contextMenu.js index 4d07901b633f..7d35faaa0cb3 100644 --- a/browser/base/content/test/browser_visibleTabs_contextMenu.js +++ b/browser/base/content/test/browser_visibleTabs_contextMenu.js @@ -43,7 +43,7 @@ function test() { is(gBrowser.visibleTabs.length, 2, "there are now two visible tabs"); // Check the context menu with two tabs - popup(origTab); + updateTabContextMenu(origTab); is(document.getElementById("context_closeTab").disabled, false, "Close Tab is enabled"); is(document.getElementById("context_reloadAllTabs").disabled, false, "Reload All Tabs is enabled"); @@ -53,7 +53,7 @@ function test() { is(gBrowser.visibleTabs.length, 1, "now there is only one visible tab"); // Check the context menu with one tab. - popup(testTab); + updateTabContextMenu(testTab); is(document.getElementById("context_closeTab").disabled, false, "Close Tab is enabled when more than one tab exists"); is(document.getElementById("context_reloadAllTabs").disabled, true, "Reload All Tabs is disabled"); @@ -64,7 +64,7 @@ function test() { is(gBrowser.visibleTabs.length, 2, "now there are two visible tabs"); // Check the context menu on the unpinned visible tab - popup(testTab); + updateTabContextMenu(testTab); is(document.getElementById("context_closeOtherTabs").disabled, true, "Close Other Tabs is disabled"); // Show all tabs @@ -72,16 +72,9 @@ function test() { gBrowser.showOnlyTheseTabs(allTabs); // Check the context menu now - popup(testTab); + updateTabContextMenu(testTab); is(document.getElementById("context_closeOtherTabs").disabled, false, "Close Other Tabs is enabled"); gBrowser.removeTab(testTab); gBrowser.removeTab(pinned); } - -function popup(tab) { - document.popupNode = tab; - TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu")); - is(TabContextMenu.contextTab, tab, "TabContextMenu context is the expected tab"); - TabContextMenu.contextTab = null; -} diff --git a/browser/base/content/test/head.js b/browser/base/content/test/head.js new file mode 100644 index 000000000000..13a2bfbe82a2 --- /dev/null +++ b/browser/base/content/test/head.js @@ -0,0 +1,8 @@ +function updateTabContextMenu(tab) { + let menu = document.getElementById("tabContextMenu"); + if (!tab) + tab = gBrowser.selectedTab; + menu.openPopup(tab, "end_after", 0, 0, true, false, {target: tab}); + is(TabContextMenu.contextTab, tab, "TabContextMenu context is the expected tab"); + menu.hidePopup(); +} diff --git a/browser/components/tabview/test/browser_tabview_bug625195.js b/browser/components/tabview/test/browser_tabview_bug625195.js index 657c48e1fd39..547b94ab70ba 100644 --- a/browser/components/tabview/test/browser_tabview_bug625195.js +++ b/browser/components/tabview/test/browser_tabview_bug625195.js @@ -47,9 +47,10 @@ function test() { } function popup(tab) { - document.popupNode = tab; - TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu")); + let menu = document.getElementById("tabContextMenu"); + menu.openPopup(tab, "end_after", 0, 0, true, false, {target: tab}); + TabContextMenu.updateContextMenu(menu); is(TabContextMenu.contextTab, tab, "TabContextMenu context is the expected tab"); - TabContextMenu.contextTab = null; + menu.hidePopup(); } diff --git a/browser/components/tabview/test/browser_tabview_bug626525.js b/browser/components/tabview/test/browser_tabview_bug626525.js index b76425a7d4d2..7b71faff5ded 100644 --- a/browser/components/tabview/test/browser_tabview_bug626525.js +++ b/browser/components/tabview/test/browser_tabview_bug626525.js @@ -138,9 +138,8 @@ function test3(win) { } function openTabContextPopup(win, tab) { - win.document.popupNode = tab; win.document.getElementById("tabContextMenu").openPopup( - tab, "end_after", 0, 0, true, false); + tab, "end_after", 0, 0, true, false, {target: tab}); } function closeTabContextPopup(win) { diff --git a/browser/components/tabview/test/browser_tabview_bug641802.js b/browser/components/tabview/test/browser_tabview_bug641802.js index e863f75d31b1..64c9efb62a64 100644 --- a/browser/components/tabview/test/browser_tabview_bug641802.js +++ b/browser/components/tabview/test/browser_tabview_bug641802.js @@ -4,8 +4,7 @@ function test() { let openMoveToGroupPopup = function () { let tab = gBrowser.selectedTab; - document.popupNode = tab; - contextMenu.openPopup(tab, "end_after", 0, 0, true, false); + contextMenu.openPopup(tab, "end_after", 0, 0, true, false, {target: tab}); tvMenuPopup.openPopup(tvMenu, "end_after", 0, 0, true, false); } diff --git a/config/createprecomplete.py b/config/createprecomplete.py index c3faa945200e..3aa69f5d4ffb 100644 --- a/config/createprecomplete.py +++ b/config/createprecomplete.py @@ -1,17 +1,18 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -# Creates the precomplete file containing the remove, remove-cc, and rmdir -# application update instructions which is used to remove files and directories -# that are no longer present in a complete update. The current working directory -# is used for the location to enumerate and to create the precomplete file. +# Creates the precomplete file containing the remove and rmdir application +# update instructions which is used to remove files and directories that are no +# longer present in a complete update. The current working directory is used for +# the location to enumerate and to create the precomplete file. import sys import os def get_build_entries(root_path): """ Iterates through the root_path, creating a list for each file and - directory. Excludes any path starting with extensions or distribution. + directory. Excludes any path starting with extensions or distribution + and paths ending with channel-prefs.js. """ rel_file_path_set = set() rel_dir_path_set = set() @@ -21,7 +22,8 @@ def get_build_entries(root_path): rel_path_file = os.path.join(parent_dir_rel_path, file_name) rel_path_file = rel_path_file.replace("\\", "/") if not (rel_path_file.startswith("distribution/") or - rel_path_file.startswith("extensions/")): + rel_path_file.startswith("extensions/") or + rel_path_file.endswith("channel-prefs.js")): rel_file_path_set.add(rel_path_file) for dir_name in dirs: @@ -40,7 +42,7 @@ def get_build_entries(root_path): return rel_file_path_list, rel_dir_path_list def generate_precomplete(): - """ Creates the precomplete file containing the remove, remove-cc, and rmdir + """ Creates the precomplete file containing the remove and rmdir application update instructions. The current working directory is used for the location to enumerate and to create the precomplete file. """ @@ -54,10 +56,7 @@ def generate_precomplete(): # open in binary mode to prevent OS specific line endings. precomplete_file = open(precomplete_file_path, "wb") for rel_file_path in rel_file_path_list: - if rel_file_path.endswith("channel-prefs.js"): - precomplete_file.writelines("remove-cc \""+rel_file_path+"\"\n") - else: - precomplete_file.writelines("remove \""+rel_file_path+"\"\n") + precomplete_file.writelines("remove \""+rel_file_path+"\"\n") for rel_dir_path in rel_dir_path_list: precomplete_file.writelines("rmdir \""+rel_dir_path+"\"\n") diff --git a/toolkit/mozapps/extensions/AddonUpdateChecker.jsm b/toolkit/mozapps/extensions/AddonUpdateChecker.jsm index a60636ecbaad..867ecb773c9a 100644 --- a/toolkit/mozapps/extensions/AddonUpdateChecker.jsm +++ b/toolkit/mozapps/extensions/AddonUpdateChecker.jsm @@ -709,7 +709,7 @@ var AddonUpdateChecker = { * The version of the platform or null to use the current version * @param aIgnoreMaxVersion * When determining compatible updates, ignore maxVersion. Optional. - * @param aIgnoreMaxVersion + * @param aIgnoreStrictCompat * When determining compatible updates, ignore strictCompatibility. Optional. * @param aCompatOverrides * Array of AddonCompatibilityOverride to take into account. Optional. diff --git a/toolkit/mozapps/update/nsUpdateService.js b/toolkit/mozapps/update/nsUpdateService.js index 78d18b136798..6d3fd20188ff 100644 --- a/toolkit/mozapps/update/nsUpdateService.js +++ b/toolkit/mozapps/update/nsUpdateService.js @@ -67,7 +67,6 @@ const PREF_APP_UPDATE_CERT_ERRORS = "app.update.cert.errors"; const PREF_APP_UPDATE_CERT_MAXERRORS = "app.update.cert.maxErrors"; const PREF_APP_UPDATE_CERT_REQUIREBUILTIN = "app.update.cert.requireBuiltIn"; const PREF_APP_UPDATE_CHANNEL = "app.update.channel"; -const PREF_APP_UPDATE_DESIREDCHANNEL = "app.update.desiredChannel"; const PREF_APP_UPDATE_ENABLED = "app.update.enabled"; const PREF_APP_UPDATE_IDLETIME = "app.update.idletime"; const PREF_APP_UPDATE_INCOMPATIBLE_MODE = "app.update.incompatible.mode"; @@ -114,7 +113,6 @@ const KEY_UPDROOT = "UpdRootD"; #endif const DIR_UPDATES = "updates"; -const FILE_CHANNELCHANGE = "channelchange"; const FILE_UPDATE_STATUS = "update.status"; const FILE_UPDATE_VERSION = "update.version"; #ifdef ANDROID @@ -642,15 +640,6 @@ function writeVersionFile(dir, version) { writeStringToFile(versionFile, version); } -function createChannelChangeFile(dir) { - var channelChangeFile = dir.clone(); - channelChangeFile.append(FILE_CHANNELCHANGE); - if (!channelChangeFile.exists()) { - channelChangeFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, - FileUtils.PERMS_FILE); - } -} - /** * Removes the contents of the Updates Directory */ @@ -781,19 +770,6 @@ function getUpdateChannel() { return channel; } -function getDesiredChannel() { - let desiredChannel = getPref("getCharPref", PREF_APP_UPDATE_DESIREDCHANNEL, null); - if (!desiredChannel) - return null; - - if (desiredChannel == getUpdateChannel()) { - Services.prefs.clearUserPref(PREF_APP_UPDATE_DESIREDCHANNEL); - return null; - } - LOG("getDesiredChannel - channel set to: " + desiredChannel); - return desiredChannel; -} - /* Get the distribution pref values, from defaults only */ function getDistributionPrefValue(aPrefName) { var prefValue = "default"; @@ -1302,9 +1278,6 @@ const UpdateServiceFactory = { */ function UpdateService() { Services.obs.addObserver(this, "xpcom-shutdown", false); - // This will clear the preference if the channel is the same as the - // application's channel. - getDesiredChannel(); } UpdateService.prototype = { @@ -1409,9 +1382,6 @@ UpdateService.prototype = { // Done with this update. Clean it up. cleanupActiveUpdate(); - - if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_DESIREDCHANNEL)) - Services.prefs.clearUserPref(PREF_APP_UPDATE_DESIREDCHANNEL); } else { // If we hit an error, then the error code will be included in the status @@ -1590,12 +1560,6 @@ UpdateService.prototype = { if (updates.length == 0) return null; - if (getDesiredChannel()) { - LOG("UpdateService:selectUpdate - skipping version checks for channel " + - "change request"); - return updates[0]; - } - // Choose the newest of the available minor and major updates. var majorUpdate = null; var minorUpdate = null; @@ -1954,7 +1918,7 @@ UpdateService.prototype = { // current application's version or the update's version is the same as the // application's version and the build ID is the same as the application's // build ID. - if (!getDesiredChannel() && update.appVersion && + if (update.appVersion && (Services.vc.compare(update.appVersion, Services.appinfo.version) < 0 || update.buildID && update.buildID == Services.appinfo.appBuildID && update.appVersion == Services.appinfo.version)) { @@ -2151,9 +2115,8 @@ UpdateManager.prototype = { * See nsIUpdateService.idl */ get activeUpdate() { - let currentChannel = getDesiredChannel() || getUpdateChannel(); if (this._activeUpdate && - this._activeUpdate.channel != currentChannel) { + this._activeUpdate.channel != getUpdateChannel()) { // User switched channels, clear out any old active updates and remove // partial downloads this._activeUpdate = null; @@ -2328,10 +2291,6 @@ Checker.prototype = { getDistributionPrefValue(PREF_APP_DISTRIBUTION_VERSION)); url = url.replace(/\+/g, "%2B"); - let desiredChannel = getDesiredChannel(); - if (desiredChannel) - url += (url.indexOf("?") != -1 ? "&" : "?") + "newchannel=" + desiredChannel; - if (force) url += (url.indexOf("?") != -1 ? "&" : "?") + "force=1"; @@ -2350,11 +2309,6 @@ Checker.prototype = { if (!url || (!this.enabled && !force)) return; - // If the user changes the update channel there can be leftover files from - // a previous download so clean the updates directory for manual checks. - if (force) - cleanUpUpdatesDir(); - this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]. createInstance(Ci.nsISupports); // This is here to let unit test code override XHR @@ -2422,7 +2376,7 @@ Checker.prototype = { continue; } update.serviceURL = this.getUpdateURL(this._forced); - update.channel = getDesiredChannel() || getUpdateChannel(); + update.channel = getUpdateChannel(); updates.push(update); } @@ -2675,7 +2629,7 @@ Downloader.prototype = { // If this is a patch that we know about, then select it. If it is a patch // that we do not know about, then remove it and use our default logic. - var useComplete = getDesiredChannel() ? true : false; + var useComplete = false; if (selectedPatch) { LOG("Downloader:_selectPatch - found existing patch with state: " + state); @@ -2922,8 +2876,6 @@ Downloader.prototype = { // Tell the updater.exe we're ready to apply. writeStatusFile(getUpdatesDir(), state); writeVersionFile(getUpdatesDir(), this._update.appVersion); - if (getDesiredChannel()) - createChannelChangeFile(getUpdatesDir()); this._update.installDate = (new Date()).getTime(); this._update.statusText = gUpdateBundle.GetStringFromName("installPending"); } diff --git a/toolkit/mozapps/update/test/shared.js b/toolkit/mozapps/update/test/shared.js index 50b3e8c08b7a..12f995326fb3 100644 --- a/toolkit/mozapps/update/test/shared.js +++ b/toolkit/mozapps/update/test/shared.js @@ -53,7 +53,6 @@ const PREF_APP_UPDATE_CERT_ERRORS = "app.update.cert.errors"; const PREF_APP_UPDATE_CERT_MAXERRORS = "app.update.cert.maxErrors"; const PREF_APP_UPDATE_CERT_REQUIREBUILTIN = "app.update.cert.requireBuiltIn"; const PREF_APP_UPDATE_CHANNEL = "app.update.channel"; -const PREF_APP_UPDATE_DESIREDCHANNEL = "app.update.desiredChannel"; const PREF_APP_UPDATE_ENABLED = "app.update.enabled"; const PREF_APP_UPDATE_IDLETIME = "app.update.idletime"; const PREF_APP_UPDATE_LOG = "app.update.log"; @@ -110,6 +109,8 @@ const PR_EXCL = 0x80; const PERMS_FILE = 0644; const PERMS_DIRECTORY = 0755; +const DEFAULT_UPDATE_VERSION = "999999.0"; + #include sharedUpdateXML.js AUS_Cu.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/mozapps/update/test/sharedUpdateXML.js b/toolkit/mozapps/update/test/sharedUpdateXML.js index f31ef8e2ecfa..f6e2e42d0ca8 100644 --- a/toolkit/mozapps/update/test/sharedUpdateXML.js +++ b/toolkit/mozapps/update/test/sharedUpdateXML.js @@ -193,13 +193,16 @@ function getLocalPatchString(aType, aURL, aHashFunction, aHashValue, aSize, * If not specified it will default to 'App Update Test'. * @param aDisplayVersion (optional) * The update's display version. - * If not specified it will default to 'version 99.0'. + * If not specified it will default to 'version #' where # is the value + * of DEFAULT_UPDATE_VERSION. * @param aAppVersion (optional) * The update's application version. - * If not specified it will default to '99.0'. + * If not specified it will default to the value of + * DEFAULT_UPDATE_VERSION. * @param aPlatformVersion (optional) * The update's platform version. - * If not specified it will default to '99.0'. + * If not specified it will default to the value of + * DEFAULT_UPDATE_VERSION. * @param aBuildID (optional) * The update's build id. * If not specified it will default to '20080811053724'. @@ -253,14 +256,17 @@ function getUpdateString(aType, aName, aDisplayVersion, aAppVersion, if (aDisplayVersion || !aVersion) { displayVersion = "displayVersion=\"" + (aDisplayVersion ? aDisplayVersion - : "version 99.0") + "\" "; + : "version " + DEFAULT_UPDATE_VERSION) + + "\" "; } // version has been deprecated in favor of displayVersion but it still needs // to be tested for forward compatibility. let version = aVersion ? "version=\"" + aVersion + "\" " : ""; let appVersion = ""; if (aAppVersion || !aExtensionVersion) { - appVersion = "appVersion=\"" + (aAppVersion ? aAppVersion : "99.0") + "\" "; + appVersion = "appVersion=\"" + + (aAppVersion ? aAppVersion : DEFAULT_UPDATE_VERSION) + + "\" "; } // extensionVersion has been deprecated in favor of appVersion but it still // needs to be tested for forward compatibility. @@ -270,7 +276,8 @@ function getUpdateString(aType, aName, aDisplayVersion, aAppVersion, let platformVersion = ""; if (aPlatformVersion) { platformVersion = "platformVersion=\"" + - (aPlatformVersion ? aPlatformVersion : "99.0") + "\" "; + (aPlatformVersion ? aPlatformVersion + : DEFAULT_UPDATE_VERSION) + "\" "; } let buildID = aBuildID ? aBuildID : "20080811053724"; // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244 diff --git a/toolkit/mozapps/update/test/unit/data/complete_cc_log_success b/toolkit/mozapps/update/test/unit/data/complete_cc_log_success deleted file mode 100644 index 5345b914b917..000000000000 --- a/toolkit/mozapps/update/test/unit/data/complete_cc_log_success +++ /dev/null @@ -1,347 +0,0 @@ -DoUpdate: changing update channel -UPDATE TYPE complete -PREPARE REMOVEFILE precomplete -PREPARE REMOVEFILE a/b/searchplugins/searchpluginstext0 -PREPARE REMOVEFILE a/b/searchplugins/searchpluginspng0.png -PREPARE REMOVEFILE a/b/removed-files -PREPARE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png -PREPARE REMOVEFILE a/b/extensions/extensions0/extensions0text0 -PREPARE REMOVEFILE a/b/exe0.exe -PREPARE REMOVEFILE a/b/defaults/pref/channel-prefs.js -PREPARE REMOVEFILE a/b/2/20/20text0 -PREPARE REMOVEFILE a/b/2/20/20png0.png -PREPARE REMOVEFILE a/b/0/0exe0.exe -PREPARE REMOVEFILE a/b/0/00/00text0 -PREPARE REMOVEDIR a/b/searchplugins/ -PREPARE REMOVEDIR a/b/extensions/extensions1/ -PREPARE REMOVEDIR a/b/extensions/extensions0/ -PREPARE REMOVEDIR a/b/extensions/ -PREPARE REMOVEDIR a/b/defaults/pref/ -PREPARE REMOVEDIR a/b/defaults/ -PREPARE REMOVEDIR a/b/2/20/ -PREPARE REMOVEDIR a/b/2/ -PREPARE REMOVEDIR a/b/0/00/ -PREPARE REMOVEDIR a/b/0/ -PREPARE REMOVEDIR a/b/ -PREPARE REMOVEDIR a/ -PREPARE ADD a/b/defaults/pref/channel-prefs.js -PREPARE ADD precomplete -PREPARE ADD a/b/searchplugins/searchpluginstext0 -PREPARE ADD a/b/searchplugins/searchpluginspng1.png -PREPARE ADD a/b/searchplugins/searchpluginspng0.png -PREPARE ADD a/b/removed-files -PREPARE ADD a/b/extensions/extensions1/extensions1text0 -PREPARE ADD a/b/extensions/extensions1/extensions1png1.png -PREPARE ADD a/b/extensions/extensions1/extensions1png0.png -PREPARE ADD a/b/extensions/extensions0/extensions0text0 -PREPARE ADD a/b/extensions/extensions0/extensions0png1.png -PREPARE ADD a/b/extensions/extensions0/extensions0png0.png -PREPARE ADD a/b/exe0.exe -PREPARE ADD a/b/1/10/10text0 -PREPARE ADD a/b/0/0exe0.exe -PREPARE ADD a/b/0/00/00text1 -PREPARE ADD a/b/0/00/00text0 -PREPARE ADD a/b/0/00/00png0.png -PREPARE REMOVEDIR a/b/9/99/ -PREPARE REMOVEDIR a/b/9/99/ -PREPARE REMOVEDIR a/b/9/98/ -PREPARE REMOVEFILE a/b/9/97/970/97xtext0 -PREPARE REMOVEFILE a/b/9/97/970/97xtext1 -PREPARE REMOVEDIR a/b/9/97/970/ -PREPARE REMOVEFILE a/b/9/97/971/97xtext0 -PREPARE REMOVEFILE a/b/9/97/971/97xtext1 -PREPARE REMOVEDIR a/b/9/97/971/ -PREPARE REMOVEDIR a/b/9/97/ -PREPARE REMOVEFILE a/b/9/96/96text0 -PREPARE REMOVEFILE a/b/9/96/96text1 -PREPARE REMOVEDIR a/b/9/96/ -PREPARE REMOVEDIR a/b/9/95/ -PREPARE REMOVEDIR a/b/9/95/ -PREPARE REMOVEDIR a/b/9/94/ -PREPARE REMOVEDIR a/b/9/94/ -PREPARE REMOVEDIR a/b/9/93/ -PREPARE REMOVEDIR a/b/9/92/ -PREPARE REMOVEDIR a/b/9/91/ -PREPARE REMOVEDIR a/b/9/90/ -PREPARE REMOVEDIR a/b/9/90/ -PREPARE REMOVEDIR a/b/8/89/ -PREPARE REMOVEDIR a/b/8/89/ -PREPARE REMOVEDIR a/b/8/88/ -PREPARE REMOVEFILE a/b/8/87/870/87xtext0 -PREPARE REMOVEFILE a/b/8/87/870/87xtext1 -PREPARE REMOVEDIR a/b/8/87/870/ -PREPARE REMOVEFILE a/b/8/87/871/87xtext0 -PREPARE REMOVEFILE a/b/8/87/871/87xtext1 -PREPARE REMOVEDIR a/b/8/87/871/ -PREPARE REMOVEDIR a/b/8/87/ -PREPARE REMOVEFILE a/b/8/86/86text0 -PREPARE REMOVEFILE a/b/8/86/86text1 -PREPARE REMOVEDIR a/b/8/86/ -PREPARE REMOVEDIR a/b/8/85/ -PREPARE REMOVEDIR a/b/8/85/ -PREPARE REMOVEDIR a/b/8/84/ -PREPARE REMOVEDIR a/b/8/84/ -PREPARE REMOVEDIR a/b/8/83/ -PREPARE REMOVEDIR a/b/8/82/ -PREPARE REMOVEDIR a/b/8/81/ -PREPARE REMOVEDIR a/b/8/80/ -PREPARE REMOVEDIR a/b/8/80/ -PREPARE REMOVEFILE a/b/7/70/7xtest.exe -PREPARE REMOVEFILE a/b/7/70/7xtext0 -PREPARE REMOVEFILE a/b/7/70/7xtext1 -PREPARE REMOVEDIR a/b/7/70/ -PREPARE REMOVEFILE a/b/7/71/7xtest.exe -PREPARE REMOVEFILE a/b/7/71/7xtext0 -PREPARE REMOVEFILE a/b/7/71/7xtext1 -PREPARE REMOVEDIR a/b/7/71/ -PREPARE REMOVEDIR a/b/7/ -PREPARE REMOVEDIR a/b/6/ -PREPARE REMOVEFILE a/b/5/5text1 -PREPARE REMOVEFILE a/b/5/5text0 -PREPARE REMOVEFILE a/b/5/5test.exe -PREPARE REMOVEFILE a/b/5/5text0 -PREPARE REMOVEFILE a/b/5/5text1 -PREPARE REMOVEDIR a/b/5/ -PREPARE REMOVEFILE a/b/4/4text1 -PREPARE REMOVEFILE a/b/4/4text0 -PREPARE REMOVEDIR a/b/4/ -PREPARE REMOVEFILE a/b/3/3text1 -PREPARE REMOVEFILE a/b/3/3text0 -EXECUTE REMOVEFILE precomplete -EXECUTE REMOVEFILE a/b/searchplugins/searchpluginstext0 -EXECUTE REMOVEFILE a/b/searchplugins/searchpluginspng0.png -EXECUTE REMOVEFILE a/b/removed-files -EXECUTE REMOVEFILE a/b/extensions/extensions1/extensions1png1.png -EXECUTE REMOVEFILE a/b/extensions/extensions0/extensions0text0 -EXECUTE REMOVEFILE a/b/exe0.exe -EXECUTE REMOVEFILE a/b/defaults/pref/channel-prefs.js -EXECUTE REMOVEFILE a/b/2/20/20text0 -EXECUTE REMOVEFILE a/b/2/20/20png0.png -EXECUTE REMOVEFILE a/b/0/0exe0.exe -EXECUTE REMOVEFILE a/b/0/00/00text0 -EXECUTE REMOVEDIR a/b/searchplugins/ -EXECUTE REMOVEDIR a/b/extensions/extensions1/ -EXECUTE REMOVEDIR a/b/extensions/extensions0/ -EXECUTE REMOVEDIR a/b/extensions/ -EXECUTE REMOVEDIR a/b/defaults/pref/ -EXECUTE REMOVEDIR a/b/defaults/ -EXECUTE REMOVEDIR a/b/2/20/ -EXECUTE REMOVEDIR a/b/2/ -EXECUTE REMOVEDIR a/b/0/00/ -EXECUTE REMOVEDIR a/b/0/ -EXECUTE REMOVEDIR a/b/ -EXECUTE REMOVEDIR a/ -EXECUTE ADD a/b/defaults/pref/channel-prefs.js -EXECUTE ADD precomplete -EXECUTE ADD a/b/searchplugins/searchpluginstext0 -EXECUTE ADD a/b/searchplugins/searchpluginspng1.png -EXECUTE ADD a/b/searchplugins/searchpluginspng0.png -EXECUTE ADD a/b/removed-files -EXECUTE ADD a/b/extensions/extensions1/extensions1text0 -EXECUTE ADD a/b/extensions/extensions1/extensions1png1.png -EXECUTE ADD a/b/extensions/extensions1/extensions1png0.png -EXECUTE ADD a/b/extensions/extensions0/extensions0text0 -EXECUTE ADD a/b/extensions/extensions0/extensions0png1.png -EXECUTE ADD a/b/extensions/extensions0/extensions0png0.png -EXECUTE ADD a/b/exe0.exe -EXECUTE ADD a/b/1/10/10text0 -EXECUTE ADD a/b/0/0exe0.exe -EXECUTE ADD a/b/0/00/00text1 -EXECUTE ADD a/b/0/00/00text0 -EXECUTE ADD a/b/0/00/00png0.png -EXECUTE REMOVEDIR a/b/9/99/ -EXECUTE REMOVEDIR a/b/9/99/ -EXECUTE REMOVEDIR a/b/9/98/ -EXECUTE REMOVEFILE a/b/9/97/970/97xtext0 -EXECUTE REMOVEFILE a/b/9/97/970/97xtext1 -EXECUTE REMOVEDIR a/b/9/97/970/ -EXECUTE REMOVEFILE a/b/9/97/971/97xtext0 -EXECUTE REMOVEFILE a/b/9/97/971/97xtext1 -EXECUTE REMOVEDIR a/b/9/97/971/ -EXECUTE REMOVEDIR a/b/9/97/ -EXECUTE REMOVEFILE a/b/9/96/96text0 -EXECUTE REMOVEFILE a/b/9/96/96text1 -EXECUTE REMOVEDIR a/b/9/96/ -EXECUTE REMOVEDIR a/b/9/95/ -EXECUTE REMOVEDIR a/b/9/95/ -EXECUTE REMOVEDIR a/b/9/94/ -EXECUTE REMOVEDIR a/b/9/94/ -EXECUTE REMOVEDIR a/b/9/93/ -EXECUTE REMOVEDIR a/b/9/92/ -EXECUTE REMOVEDIR a/b/9/91/ -EXECUTE REMOVEDIR a/b/9/90/ -EXECUTE REMOVEDIR a/b/9/90/ -EXECUTE REMOVEDIR a/b/8/89/ -EXECUTE REMOVEDIR a/b/8/89/ -EXECUTE REMOVEDIR a/b/8/88/ -EXECUTE REMOVEFILE a/b/8/87/870/87xtext0 -EXECUTE REMOVEFILE a/b/8/87/870/87xtext1 -EXECUTE REMOVEDIR a/b/8/87/870/ -EXECUTE REMOVEFILE a/b/8/87/871/87xtext0 -EXECUTE REMOVEFILE a/b/8/87/871/87xtext1 -EXECUTE REMOVEDIR a/b/8/87/871/ -EXECUTE REMOVEDIR a/b/8/87/ -EXECUTE REMOVEFILE a/b/8/86/86text0 -EXECUTE REMOVEFILE a/b/8/86/86text1 -EXECUTE REMOVEDIR a/b/8/86/ -EXECUTE REMOVEDIR a/b/8/85/ -EXECUTE REMOVEDIR a/b/8/85/ -EXECUTE REMOVEDIR a/b/8/84/ -EXECUTE REMOVEDIR a/b/8/84/ -EXECUTE REMOVEDIR a/b/8/83/ -EXECUTE REMOVEDIR a/b/8/82/ -EXECUTE REMOVEDIR a/b/8/81/ -EXECUTE REMOVEDIR a/b/8/80/ -EXECUTE REMOVEDIR a/b/8/80/ -EXECUTE REMOVEFILE a/b/7/70/7xtest.exe -EXECUTE REMOVEFILE a/b/7/70/7xtext0 -EXECUTE REMOVEFILE a/b/7/70/7xtext1 -EXECUTE REMOVEDIR a/b/7/70/ -EXECUTE REMOVEFILE a/b/7/71/7xtest.exe -EXECUTE REMOVEFILE a/b/7/71/7xtext0 -EXECUTE REMOVEFILE a/b/7/71/7xtext1 -EXECUTE REMOVEDIR a/b/7/71/ -EXECUTE REMOVEDIR a/b/7/ -EXECUTE REMOVEDIR a/b/6/ -EXECUTE REMOVEFILE a/b/5/5text1 -EXECUTE REMOVEFILE a/b/5/5text0 -EXECUTE REMOVEFILE a/b/5/5test.exe -EXECUTE REMOVEFILE a/b/5/5text0 -file cannot be removed because it does not exist; skipping -EXECUTE REMOVEFILE a/b/5/5text1 -file cannot be removed because it does not exist; skipping -EXECUTE REMOVEDIR a/b/5/ -EXECUTE REMOVEFILE a/b/4/4text1 -EXECUTE REMOVEFILE a/b/4/4text0 -EXECUTE REMOVEDIR a/b/4/ -EXECUTE REMOVEFILE a/b/3/3text1 -EXECUTE REMOVEFILE a/b/3/3text0 -FINISH REMOVEFILE precomplete -FINISH REMOVEFILE a/b/searchplugins/searchpluginstext0 -FINISH REMOVEFILE a/b/searchplugins/searchpluginspng0.png -FINISH REMOVEFILE a/b/removed-files -FINISH REMOVEFILE a/b/extensions/extensions1/extensions1png1.png -FINISH REMOVEFILE a/b/extensions/extensions0/extensions0text0 -FINISH REMOVEFILE a/b/exe0.exe -FINISH REMOVEFILE a/b/defaults/pref/channel-prefs.js -FINISH REMOVEFILE a/b/2/20/20text0 -FINISH REMOVEFILE a/b/2/20/20png0.png -FINISH REMOVEFILE a/b/0/0exe0.exe -FINISH REMOVEFILE a/b/0/00/00text0 -FINISH REMOVEDIR a/b/searchplugins/ -removing directory: a/b/searchplugins/, rv: 0 -FINISH REMOVEDIR a/b/extensions/extensions1/ -removing directory: a/b/extensions/extensions1/, rv: 0 -FINISH REMOVEDIR a/b/extensions/extensions0/ -removing directory: a/b/extensions/extensions0/, rv: 0 -FINISH REMOVEDIR a/b/extensions/ -removing directory: a/b/extensions/, rv: 0 -FINISH REMOVEDIR a/b/defaults/pref/ -removing directory: a/b/defaults/pref/, rv: 0 -FINISH REMOVEDIR a/b/defaults/ -removing directory: a/b/defaults/, rv: 0 -FINISH REMOVEDIR a/b/2/20/ -FINISH REMOVEDIR a/b/2/ -FINISH REMOVEDIR a/b/0/00/ -removing directory: a/b/0/00/, rv: 0 -FINISH REMOVEDIR a/b/0/ -removing directory: a/b/0/, rv: 0 -FINISH REMOVEDIR a/b/ -removing directory: a/b/, rv: 0 -FINISH REMOVEDIR a/ -removing directory: a/, rv: 0 -FINISH ADD a/b/defaults/pref/channel-prefs.js -FINISH ADD precomplete -FINISH ADD a/b/searchplugins/searchpluginstext0 -FINISH ADD a/b/searchplugins/searchpluginspng1.png -FINISH ADD a/b/searchplugins/searchpluginspng0.png -FINISH ADD a/b/removed-files -FINISH ADD a/b/extensions/extensions1/extensions1text0 -FINISH ADD a/b/extensions/extensions1/extensions1png1.png -FINISH ADD a/b/extensions/extensions1/extensions1png0.png -FINISH ADD a/b/extensions/extensions0/extensions0text0 -FINISH ADD a/b/extensions/extensions0/extensions0png1.png -FINISH ADD a/b/extensions/extensions0/extensions0png0.png -FINISH ADD a/b/exe0.exe -FINISH ADD a/b/1/10/10text0 -FINISH ADD a/b/0/0exe0.exe -FINISH ADD a/b/0/00/00text1 -FINISH ADD a/b/0/00/00text0 -FINISH ADD a/b/0/00/00png0.png -FINISH REMOVEDIR a/b/9/99/ -FINISH REMOVEDIR a/b/9/99/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/9/98/ -FINISH REMOVEFILE a/b/9/97/970/97xtext0 -FINISH REMOVEFILE a/b/9/97/970/97xtext1 -FINISH REMOVEDIR a/b/9/97/970/ -FINISH REMOVEFILE a/b/9/97/971/97xtext0 -FINISH REMOVEFILE a/b/9/97/971/97xtext1 -FINISH REMOVEDIR a/b/9/97/971/ -FINISH REMOVEDIR a/b/9/97/ -FINISH REMOVEFILE a/b/9/96/96text0 -FINISH REMOVEFILE a/b/9/96/96text1 -FINISH REMOVEDIR a/b/9/96/ -FINISH REMOVEDIR a/b/9/95/ -FINISH REMOVEDIR a/b/9/95/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/9/94/ -FINISH REMOVEDIR a/b/9/94/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/9/93/ -FINISH REMOVEDIR a/b/9/92/ -removing directory: a/b/9/92/, rv: 0 -FINISH REMOVEDIR a/b/9/91/ -removing directory: a/b/9/91/, rv: 0 -FINISH REMOVEDIR a/b/9/90/ -FINISH REMOVEDIR a/b/9/90/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/8/89/ -FINISH REMOVEDIR a/b/8/89/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/8/88/ -FINISH REMOVEFILE a/b/8/87/870/87xtext0 -FINISH REMOVEFILE a/b/8/87/870/87xtext1 -FINISH REMOVEDIR a/b/8/87/870/ -FINISH REMOVEFILE a/b/8/87/871/87xtext0 -FINISH REMOVEFILE a/b/8/87/871/87xtext1 -FINISH REMOVEDIR a/b/8/87/871/ -FINISH REMOVEDIR a/b/8/87/ -FINISH REMOVEFILE a/b/8/86/86text0 -FINISH REMOVEFILE a/b/8/86/86text1 -FINISH REMOVEDIR a/b/8/86/ -FINISH REMOVEDIR a/b/8/85/ -FINISH REMOVEDIR a/b/8/85/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/8/84/ -FINISH REMOVEDIR a/b/8/84/ -directory no longer exists; skipping -FINISH REMOVEDIR a/b/8/83/ -FINISH REMOVEDIR a/b/8/82/ -removing directory: a/b/8/82/, rv: 0 -FINISH REMOVEDIR a/b/8/81/ -removing directory: a/b/8/81/, rv: 0 -FINISH REMOVEDIR a/b/8/80/ -FINISH REMOVEDIR a/b/8/80/ -directory no longer exists; skipping -FINISH REMOVEFILE a/b/7/70/7xtest.exe -FINISH REMOVEFILE a/b/7/70/7xtext0 -FINISH REMOVEFILE a/b/7/70/7xtext1 -FINISH REMOVEDIR a/b/7/70/ -FINISH REMOVEFILE a/b/7/71/7xtest.exe -FINISH REMOVEFILE a/b/7/71/7xtext0 -FINISH REMOVEFILE a/b/7/71/7xtext1 -FINISH REMOVEDIR a/b/7/71/ -FINISH REMOVEDIR a/b/7/ -FINISH REMOVEDIR a/b/6/ -FINISH REMOVEFILE a/b/5/5text1 -FINISH REMOVEFILE a/b/5/5text0 -FINISH REMOVEFILE a/b/5/5test.exe -FINISH REMOVEDIR a/b/5/ -FINISH REMOVEFILE a/b/4/4text1 -FINISH REMOVEFILE a/b/4/4text0 -FINISH REMOVEDIR a/b/4/ -FINISH REMOVEFILE a/b/3/3text1 -FINISH REMOVEFILE a/b/3/3text0 -succeeded -calling QuitProgressUI diff --git a/toolkit/mozapps/update/test/unit/data/partial_log_failure b/toolkit/mozapps/update/test/unit/data/partial_log_failure index b63504c73b80..84f298ab17dc 100644 --- a/toolkit/mozapps/update/test/unit/data/partial_log_failure +++ b/toolkit/mozapps/update/test/unit/data/partial_log_failure @@ -1,6 +1,4 @@ -DoUpdate: changing update channel UPDATE TYPE partial -DoUpdate: unable to change channel with a partial update PREPARE ADD precomplete PREPARE ADD a/b/searchplugins/searchpluginstext0 PREPARE PATCH a/b/searchplugins/searchpluginspng1.png diff --git a/toolkit/mozapps/update/test/unit/data/partial_log_success b/toolkit/mozapps/update/test/unit/data/partial_log_success index 8dbf02413882..a8290716dd69 100644 --- a/toolkit/mozapps/update/test/unit/data/partial_log_success +++ b/toolkit/mozapps/update/test/unit/data/partial_log_success @@ -1,6 +1,4 @@ -DoUpdate: changing update channel UPDATE TYPE partial -DoUpdate: unable to change channel with a partial update PREPARE ADD precomplete PREPARE ADD a/b/searchplugins/searchpluginstext0 PREPARE PATCH a/b/searchplugins/searchpluginspng1.png diff --git a/toolkit/mozapps/update/test/unit/head_update.js.in b/toolkit/mozapps/update/test/unit/head_update.js.in index ca8121a2bede..6879da256f0d 100644 --- a/toolkit/mozapps/update/test/unit/head_update.js.in +++ b/toolkit/mozapps/update/test/unit/head_update.js.in @@ -91,7 +91,6 @@ const UPDATER_BIN_FILE = "updater" + BIN_SUFFIX; const MAINTENANCE_SERVICE_BIN_FILE = "maintenanceservice.exe"; const MAINTENANCE_SERVICE_INSTALLER_BIN_FILE = "maintenanceservice_installer.exe"; const UPDATES_DIR_SUFFIX = "_mar"; -const CHANNEL_CHANGE_FILE = "channelchange"; const LOG_COMPLETE_SUCCESS = "data/complete_log_success"; const LOG_COMPLETE_CC_SUCCESS = "data/complete_cc_log_success"; @@ -713,6 +712,10 @@ function runUpdateUsingService(aInitialStatus, aExpectedStatus, // sanity check do_check_eq(readStatusFile(updatesDir), aInitialStatus); + file = updatesDir.clone(); + file.append(FILE_UPDATE_VERSION); + writeFile(file, DEFAULT_UPDATE_VERSION + "\n"); + gServiceLaunchedCallbackArgs = [ "-no-remote", "-process-updates", diff --git a/toolkit/mozapps/update/test/unit/test_0030_general.js b/toolkit/mozapps/update/test/unit/test_0030_general.js index e7f0ced92ee6..694c36273b4a 100644 --- a/toolkit/mozapps/update/test/unit/test_0030_general.js +++ b/toolkit/mozapps/update/test/unit/test_0030_general.js @@ -95,17 +95,12 @@ function run_test_helper_pt1(aMsg, aExpectedStatusResult, aNextRunFunc) { function check_test_helper_pt1_1() { do_check_eq(gUpdateCount, 1); - let channelchange = getUpdatesDir(); - channelchange.append("0"); - channelchange.append(CHANNEL_CHANGE_FILE); - do_check_false(channelchange.exists()); gCheckFunc = check_test_helper_pt1_2; var bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount); var state = gAUS.downloadUpdate(bestUpdate, false); if (state == STATE_NONE || state == STATE_FAILED) do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state); gAUS.addDownloadListener(downloadListener); - channelchange.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); } function check_test_helper_pt1_2() { diff --git a/toolkit/mozapps/update/test/unit/test_0040_general.js b/toolkit/mozapps/update/test/unit/test_0040_general.js index fe1f1315611a..4f19e3caeafd 100644 --- a/toolkit/mozapps/update/test/unit/test_0040_general.js +++ b/toolkit/mozapps/update/test/unit/test_0040_general.js @@ -428,52 +428,5 @@ function run_test_pt13() { function check_test_pt13() { do_check_eq(getResult(gRequestURL), "?extra=param&force=1"); - run_test_pt14(); -} - -// url with newchannel param that doesn't already have a param -function run_test_pt14() { - gCheckFunc = check_test_pt14; - Services.prefs.setCharPref(PREF_APP_UPDATE_DESIREDCHANNEL, "testchannel"); - var url = URL_PREFIX; - logTestInfo("testing url with newchannel param that doesn't already have a " + - "param - " + url); - setUpdateURLOverride(url); - gUpdateChecker.checkForUpdates(updateCheckListener, false); -} - -function check_test_pt14() { - do_check_eq(getResult(gRequestURL), "?newchannel=testchannel"); - run_test_pt15(); -} - -// url with newchannel param that already has a param -function run_test_pt15() { - gCheckFunc = check_test_pt15; - Services.prefs.setCharPref(PREF_APP_UPDATE_DESIREDCHANNEL, "testchannel"); - var url = URL_PREFIX + "?extra=param"; - logTestInfo("testing url with newchannel param that already has a " + - "param - " + url); - setUpdateURLOverride(url); - gUpdateChecker.checkForUpdates(updateCheckListener, false); -} - -function check_test_pt15() { - do_check_eq(getResult(gRequestURL), "?extra=param&newchannel=testchannel"); - run_test_pt16(); -} - -// url with force and newchannel params -function run_test_pt16() { - gCheckFunc = check_test_pt16; - Services.prefs.setCharPref(PREF_APP_UPDATE_DESIREDCHANNEL, "testchannel"); - var url = URL_PREFIX; - logTestInfo("testing url with force and newchannel params - " + url); - setUpdateURLOverride(url); - gUpdateChecker.checkForUpdates(updateCheckListener, true); -} - -function check_test_pt16() { - do_check_eq(getResult(gRequestURL), "?newchannel=testchannel&force=1"); do_test_finished(); } diff --git a/toolkit/mozapps/update/test/unit/test_0070_update_dir_cleanup.js b/toolkit/mozapps/update/test/unit/test_0070_update_dir_cleanup.js index b460b4549fe0..212556ad0c28 100644 --- a/toolkit/mozapps/update/test/unit/test_0070_update_dir_cleanup.js +++ b/toolkit/mozapps/update/test/unit/test_0070_update_dir_cleanup.js @@ -58,11 +58,6 @@ function run_test() { log.append(FILE_UPDATE_LOG); writeFile(log, "Last Update Log"); - let channelchange = dir.clone(); - channelchange.append("0"); - channelchange.append(CHANNEL_CHANGE_FILE); - channelchange.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - standardInit(); logTestInfo("testing " + log.path + " shouldn't exist"); @@ -85,9 +80,6 @@ function run_test() { logTestInfo("testing " + dir.path + " should exist (bug 512994)"); do_check_true(dir.exists()); - logTestInfo("testing " + channelchange.path + " shouldn't exist"); - do_check_false(channelchange.exists()); - do_test_finished(); } diff --git a/toolkit/mozapps/update/test/unit/test_0110_general.js b/toolkit/mozapps/update/test/unit/test_0110_general.js index 1446169d72f9..1491ce4e77b9 100644 --- a/toolkit/mozapps/update/test/unit/test_0110_general.js +++ b/toolkit/mozapps/update/test/unit/test_0110_general.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0111_general.js b/toolkit/mozapps/update/test/unit/test_0111_general.js index 78452b268301..57f425a5aca9 100644 --- a/toolkit/mozapps/update/test/unit/test_0111_general.js +++ b/toolkit/mozapps/update/test/unit/test_0111_general.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", @@ -279,12 +278,6 @@ function run_test() { let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); let applyToDir = getApplyDirFile(); - // Check that trying to change channels for a partial update doesn't change - // the update channel (the channel-prefs.js file should not be updated). - let force = updatesDir.clone(); - force.append(CHANNEL_CHANGE_FILE); - force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - // For Mac OS X set the last modified time for the root directory to a date in // the past to test that the last modified time is updated on all updates since // the precomplete file in the root of the bundle is renamed, etc. (bug 600098). diff --git a/toolkit/mozapps/update/test/unit/test_0112_general.js b/toolkit/mozapps/update/test/unit/test_0112_general.js index 7105e2c0bf10..bfa3c39ed1bc 100644 --- a/toolkit/mozapps/update/test/unit/test_0112_general.js +++ b/toolkit/mozapps/update/test/unit/test_0112_general.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", @@ -272,12 +271,6 @@ function run_test() { let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); let applyToDir = getApplyDirFile(); - // Check that trying to change channels for a failed partial update doesn't - // change the update channel (the channel-prefs.js file should not be updated). - let force = updatesDir.clone(); - force.append(CHANNEL_CHANGE_FILE); - force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - // For Mac OS X set the last modified time for the root directory to a date in // the past to test that the last modified time is updated on all updates since // the precomplete file in the root of the bundle is renamed, etc. (bug 600098). diff --git a/toolkit/mozapps/update/test/unit/test_0120_channelChange_complete.js b/toolkit/mozapps/update/test/unit/test_0120_channelChange_complete.js deleted file mode 100644 index 90522d77b3e9..000000000000 --- a/toolkit/mozapps/update/test/unit/test_0120_channelChange_complete.js +++ /dev/null @@ -1,289 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -/* Channel change complete MAR file patch apply test */ - -const TEST_ID = "0120"; -// All we care about is that the last modified time has changed so that Mac OS -// X Launch Services invalidates its cache so the test allows up to one minute -// difference in the last modified time. -const MAX_TIME_DIFFERENCE = 60000; - -// The files are in the same order as they are applied from the mar -const TEST_FILES = [ -{ - description : "Added by update.manifest (add-cc)", - fileName : "channel-prefs.js", - relPathDir : "a/b/defaults/pref/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0767, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "precomplete", - relPathDir : "", - originalContents : null, - compareContents : null, - originalFile : "data/partial_precomplete", - compareFile : "data/complete_precomplete", - originalPerms : 0755, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginstext0", - relPathDir : "a/b/searchplugins/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0775, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginspng1.png", - relPathDir : "a/b/searchplugins/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginspng0.png", - relPathDir : "a/b/searchplugins/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "removed-files", - relPathDir : "a/b/", - originalContents : null, - compareContents : null, - originalFile : "data/partial_removed-files", - compareFile : "data/complete_removed-files", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1text0", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1png1.png", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1png0.png", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0text0", - relPathDir : "a/b/extensions/extensions0/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0png1.png", - relPathDir : "a/b/extensions/extensions0/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0png0.png", - relPathDir : "a/b/extensions/extensions0/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "exe0.exe", - relPathDir : "a/b/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0777, - comparePerms : 0755 -}, { - description : "Added by update.manifest (add)", - fileName : "10text0", - relPathDir : "a/b/1/10/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0767, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "0exe0.exe", - relPathDir : "a/b/0/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0777, - comparePerms : 0755 -}, { - description : "Added by update.manifest (add)", - fileName : "00text1", - relPathDir : "a/b/0/00/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0677, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "00text0", - relPathDir : "a/b/0/00/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0775, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "00png0.png", - relPathDir : "a/b/0/00/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : 0776, - comparePerms : 0644 -}, { - description : "Removed by precomplete (remove)", - fileName : "20text0", - relPathDir : "a/b/2/20/", - originalContents : "ToBeDeleted\n", - compareContents : null, - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : null -}, { - description : "Removed by precomplete (remove)", - fileName : "20png0.png", - relPathDir : "a/b/2/20/", - originalContents : "ToBeDeleted\n", - compareContents : null, - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : null -}]; - -ADDITIONAL_TEST_DIRS = [ -{ - description : "Removed by precomplete (rmdir)", - relPathDir : "a/b/2/20/", - dirRemoved : true -}, { - description : "Removed by precomplete (rmdir)", - relPathDir : "a/b/2/", - dirRemoved : true -}]; - -function run_test() { - do_test_pending(); - do_register_cleanup(cleanupUpdaterTest); - - setupUpdaterTest(MAR_COMPLETE_FILE); - - let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - let applyToDir = getApplyDirFile(); - - // Check that trying to change channels for a complete update changes the - // update channel (the channel-prefs.js file should be updated). - let channelchange = updatesDir.clone(); - channelchange.append(CHANNEL_CHANGE_FILE); - channelchange.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - - // For Mac OS X set the last modified time for the root directory to a date in - // the past to test that the last modified time is updated on a successful - // update (bug 600098). - if (IS_MACOSX) { - let now = Date.now(); - let yesterday = now - (1000 * 60 * 60 * 24); - applyToDir.lastModifiedTime = yesterday; - } - - // apply the complete mar - let exitValue = runUpdate(); - logTestInfo("testing updater binary process exitValue for success when " + - "applying a complete mar"); - do_check_eq(exitValue, 0); - - logTestInfo("testing update.status should be " + STATE_SUCCEEDED); - let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED); - - // For Mac OS X check that the last modified time for a directory has been - // updated after a successful update (bug 600098). - if (IS_MACOSX) { - logTestInfo("testing last modified time on the apply to directory has " + - "changed after a successful update (bug 600098)"); - let now = Date.now(); - let timeDiff = Math.abs(applyToDir.lastModifiedTime - now); - do_check_true(timeDiff < MAX_TIME_DIFFERENCE); - } - - checkFilesAfterUpdateSuccess(); - // Sorting on Linux is different so skip this check for now. - if (!IS_UNIX) { - checkUpdateLogContents(LOG_COMPLETE_CC_SUCCESS); - } - - logTestInfo("testing tobedeleted directory doesn't exist"); - let toBeDeletedDir = getApplyDirFile("tobedeleted", true); - do_check_false(toBeDeletedDir.exists()); - - checkCallbackAppLog(); -} diff --git a/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js b/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js index 315426d0328d..5fc25de43ff1 100644 --- a/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js @@ -12,8 +12,7 @@ const MAR_COMPLETE_WIN_FILE = "data/complete_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js b/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js index fe6bd76d5303..eb8de17fd185 100644 --- a/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js +++ b/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_unix_complete.js b/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_unix_complete.js index 8ec38b7888c4..2fb5376bd269 100644 --- a/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_unix_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_unix_complete.js @@ -15,8 +15,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js b/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js index f029f4022fa4..f29afa73010f 100644 --- a/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js @@ -11,8 +11,7 @@ const TEST_ID = "0160"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js b/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js index 3c4902c5e4fd..bba86a59c4e8 100644 --- a/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js @@ -11,8 +11,7 @@ const TEST_ID = "0170"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js b/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js index 57efeaa0b25e..6797f379484a 100644 --- a/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js +++ b/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js @@ -11,8 +11,7 @@ const TEST_ID = "0171"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js b/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js index 26dba3f2044f..1716f3fb469d 100644 --- a/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js @@ -11,8 +11,7 @@ const TEST_ID = "0180"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js b/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js index 2f425197e01d..915dd0e811c2 100644 --- a/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js +++ b/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js b/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js index 3b64139cd289..14a4ff185ce4 100644 --- a/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js +++ b/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js @@ -11,8 +11,7 @@ const TEST_ID = "0182"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js b/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js index e3acb96fe20c..9920fcb89a76 100644 --- a/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js +++ b/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test/unit/xpcshell_updater.ini b/toolkit/mozapps/update/test/unit/xpcshell_updater.ini index d5da4b6c3fa9..8b2d93b0870f 100644 --- a/toolkit/mozapps/update/test/unit/xpcshell_updater.ini +++ b/toolkit/mozapps/update/test/unit/xpcshell_updater.ini @@ -1,5 +1,4 @@ [test_0110_general.js] [test_0111_general.js] [test_0112_general.js] -[test_0120_channelChange_complete.js] [test_0200_app_launch_apply_update.js] diff --git a/toolkit/mozapps/update/test_svc/unit/test_0110_general_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0110_general_svc.js index b308f7a2b1b3..5cdaa982949e 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0110_general_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0110_general_svc.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0111_general_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0111_general_svc.js index 4b6aff1d194a..980f642ca4df 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0111_general_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0111_general_svc.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", @@ -282,12 +281,6 @@ function run_test() { let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - // Check that trying to change channels for a partial update doesn't change - // the update channel (the channel-prefs.js file should not be updated). - let force = updatesDir.clone(); - force.append(CHANNEL_CHANGE_FILE); - force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - // apply the partial mar runUpdateUsingService(STATE_PENDING_SVC, STATE_SUCCEEDED, checkUpdateApplied); } diff --git a/toolkit/mozapps/update/test_svc/unit/test_0112_general_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0112_general_svc.js index 626f01a44add..9e9f79f433f7 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0112_general_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0112_general_svc.js @@ -49,8 +49,7 @@ const MAX_TIME_DIFFERENCE = 60000; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", @@ -275,12 +274,6 @@ function run_test() { let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - // Check that trying to change channels for a failed partial update doesn't - // change the update channel (the channel-prefs.js file should not be updated). - let force = updatesDir.clone(); - force.append(CHANNEL_CHANGE_FILE); - force.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - // apply the partial mar runUpdateUsingService(STATE_PENDING_SVC, STATE_FAILED, checkUpdateApplied); } diff --git a/toolkit/mozapps/update/test_svc/unit/test_0120_channelChange_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0120_channelChange_complete_svc.js deleted file mode 100644 index 36a4b06d76c4..000000000000 --- a/toolkit/mozapps/update/test_svc/unit/test_0120_channelChange_complete_svc.js +++ /dev/null @@ -1,268 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -/* Channel change complete MAR file patch apply test */ - -const TEST_ID = "0120_svc"; -// All we care about is that the last modified time has changed so that Mac OS -// X Launch Services invalidates its cache so the test allows up to one minute -// difference in the last modified time. -const MAX_TIME_DIFFERENCE = 60000; - -// The files are in the same order as they are applied from the mar -const TEST_FILES = [ -{ - description : "Added by update.manifest (add-cc)", - fileName : "channel-prefs.js", - relPathDir : "a/b/defaults/pref/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0767, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "precomplete", - relPathDir : "", - originalContents : null, - compareContents : null, - originalFile : "data/partial_precomplete", - compareFile : "data/complete_precomplete", - originalPerms : 0755, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginstext0", - relPathDir : "a/b/searchplugins/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0775, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginspng1.png", - relPathDir : "a/b/searchplugins/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "searchpluginspng0.png", - relPathDir : "a/b/searchplugins/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "removed-files", - relPathDir : "a/b/", - originalContents : null, - compareContents : null, - originalFile : "data/partial_removed-files", - compareFile : "data/complete_removed-files", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1text0", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1png1.png", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0666, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions1png0.png", - relPathDir : "a/b/extensions/extensions1/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0text0", - relPathDir : "a/b/extensions/extensions0/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0png1.png", - relPathDir : "a/b/extensions/extensions0/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest if the parent directory " + - "exists (add-if)", - fileName : "extensions0png0.png", - relPathDir : "a/b/extensions/extensions0/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : null, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "exe0.exe", - relPathDir : "a/b/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0777, - comparePerms : 0755 -}, { - description : "Added by update.manifest (add)", - fileName : "10text0", - relPathDir : "a/b/1/10/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0767, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "0exe0.exe", - relPathDir : "a/b/0/", - originalContents : null, - compareContents : null, - originalFile : "data/partial.png", - compareFile : "data/complete.png", - originalPerms : 0777, - comparePerms : 0755 -}, { - description : "Added by update.manifest (add)", - fileName : "00text1", - relPathDir : "a/b/0/00/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0677, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "00text0", - relPathDir : "a/b/0/00/", - originalContents : "ToBeReplacedWithFromComplete\n", - compareContents : "FromComplete\n", - originalFile : null, - compareFile : null, - originalPerms : 0775, - comparePerms : 0644 -}, { - description : "Added by update.manifest (add)", - fileName : "00png0.png", - relPathDir : "a/b/0/00/", - originalContents : null, - compareContents : null, - originalFile : null, - compareFile : "data/complete.png", - originalPerms : 0776, - comparePerms : 0644 -}, { - description : "Removed by precomplete (remove)", - fileName : "20text0", - relPathDir : "a/b/2/20/", - originalContents : "ToBeDeleted\n", - compareContents : null, - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : null -}, { - description : "Removed by precomplete (remove)", - fileName : "20png0.png", - relPathDir : "a/b/2/20/", - originalContents : "ToBeDeleted\n", - compareContents : null, - originalFile : null, - compareFile : null, - originalPerms : null, - comparePerms : null -}]; - -ADDITIONAL_TEST_DIRS = [ -{ - description : "Removed by precomplete (rmdir)", - relPathDir : "a/b/2/20/", - dirRemoved : true -}, { - description : "Removed by precomplete (rmdir)", - relPathDir : "a/b/2/", - dirRemoved : true -}]; - -function run_test() { - if (!shouldRunServiceTest()) { - return; - } - - do_test_pending(); - do_register_cleanup(cleanupUpdaterTest); - - setupUpdaterTest(MAR_COMPLETE_FILE); - - let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - - // Check that trying to change channels for a complete update changes the - // update channel (the channel-prefs.js file should be updated). - let channelchange = updatesDir.clone(); - channelchange.append(CHANNEL_CHANGE_FILE); - channelchange.create(AUS_Ci.nsIFile.FILE_TYPE, PERMS_FILE); - - runUpdateUsingService(STATE_PENDING_SVC, STATE_SUCCEEDED, checkUpdateApplied); -} - -function checkUpdateApplied() { - logTestInfo("testing update.status should be " + STATE_SUCCEEDED); - let updatesDir = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX); - do_check_eq(readStatusFile(updatesDir), STATE_SUCCEEDED); - - checkFilesAfterUpdateSuccess(); - checkUpdateLogContents(LOG_COMPLETE_CC_SUCCESS); - - logTestInfo("testing tobedeleted directory doesn't exist"); - let toBeDeletedDir = getApplyDirFile("tobedeleted", true); - do_check_false(toBeDeletedDir.exists()); - - checkCallbackServiceLog(); -} diff --git a/toolkit/mozapps/update/test_svc/unit/test_0150_appBinReplaced_xp_win_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0150_appBinReplaced_xp_win_complete_svc.js index 3fc19c563695..3a88d61e9bcc 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0150_appBinReplaced_xp_win_complete_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0150_appBinReplaced_xp_win_complete_svc.js @@ -12,8 +12,7 @@ const MAR_COMPLETE_WIN_FILE = "data/complete_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0151_appBinPatched_xp_win_partial_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0151_appBinPatched_xp_win_partial_svc.js index 517c94c2840f..c5a4ca315f7e 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0151_appBinPatched_xp_win_partial_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0151_appBinPatched_xp_win_partial_svc.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0160_appInUse_xp_win_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0160_appInUse_xp_win_complete_svc.js index 18ea6c7e66a2..f5e5f63a74cb 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0160_appInUse_xp_win_complete_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0160_appInUse_xp_win_complete_svc.js @@ -11,8 +11,7 @@ const TEST_ID = "0160_svc"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0170_fileLocked_xp_win_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0170_fileLocked_xp_win_complete_svc.js index e251b4794a70..b7c4dfb59f94 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0170_fileLocked_xp_win_complete_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0170_fileLocked_xp_win_complete_svc.js @@ -11,8 +11,7 @@ const TEST_ID = "0170_svc"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0171_fileLocked_xp_win_partial_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0171_fileLocked_xp_win_partial_svc.js index 2b0b3803fb77..29beb73c65b1 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0171_fileLocked_xp_win_partial_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0171_fileLocked_xp_win_partial_svc.js @@ -11,8 +11,7 @@ const TEST_ID = "0171_svc"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0180_fileInUse_xp_win_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0180_fileInUse_xp_win_complete_svc.js index 90b9530490cb..e5ad35d0f29b 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0180_fileInUse_xp_win_complete_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0180_fileInUse_xp_win_complete_svc.js @@ -11,8 +11,7 @@ const TEST_ID = "0180_svc"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0181_fileInUse_xp_win_partial_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0181_fileInUse_xp_win_partial_svc.js index 4120cbfaadb3..b61f10996ebd 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0181_fileInUse_xp_win_partial_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0181_fileInUse_xp_win_partial_svc.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial_win.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0182_rmrfdirFileInUse_xp_win_complete_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0182_rmrfdirFileInUse_xp_win_complete_svc.js index b8ebc525b48c..e4fa4cc75496 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0182_rmrfdirFileInUse_xp_win_complete_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0182_rmrfdirFileInUse_xp_win_complete_svc.js @@ -11,8 +11,7 @@ const TEST_ID = "0182_svc"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/test_0183_rmrfdirFileInUse_xp_win_partial_svc.js b/toolkit/mozapps/update/test_svc/unit/test_0183_rmrfdirFileInUse_xp_win_partial_svc.js index 1a039f93a523..20736b70fe5b 100644 --- a/toolkit/mozapps/update/test_svc/unit/test_0183_rmrfdirFileInUse_xp_win_partial_svc.js +++ b/toolkit/mozapps/update/test_svc/unit/test_0183_rmrfdirFileInUse_xp_win_partial_svc.js @@ -12,8 +12,7 @@ const MAR_IN_USE_WIN_FILE = "data/partial.mar"; // operations located in the precomplete file performed first. const TEST_FILES = [ { - description : "Only added by update.manifest for complete updates " + - "when there is a channel change (add-cc)", + description : "Should never change", fileName : "channel-prefs.js", relPathDir : "a/b/defaults/pref/", originalContents : "ShouldNotBeReplaced\n", diff --git a/toolkit/mozapps/update/test_svc/unit/xpcshell.ini b/toolkit/mozapps/update/test_svc/unit/xpcshell.ini index 98372a6ffb82..a4a787f36efe 100644 --- a/toolkit/mozapps/update/test_svc/unit/xpcshell.ini +++ b/toolkit/mozapps/update/test_svc/unit/xpcshell.ini @@ -6,7 +6,6 @@ tail = [test_0110_general_svc.js] [test_0111_general_svc.js] [test_0112_general_svc.js] -[test_0120_channelChange_complete_svc.js] [test_0150_appBinReplaced_xp_win_complete_svc.js] [test_0151_appBinPatched_xp_win_partial_svc.js] [test_0160_appInUse_xp_win_complete_svc.js] diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 270978c8da96..87b75761bc1b 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -54,20 +54,16 @@ * * updatev2.manifest * ----------------- - * method = "add" | "add-cc" | "add-if" | "patch" | "patch-if" | "remove" | + * method = "add" | "add-if" | "patch" | "patch-if" | "remove" | * "rmdir" | "rmrfdir" | type * - * 'add-cc' is an add action to perform on channel change. - * * 'type' is the update type (e.g. complete or partial) and when present MUST * be the first entry in the update manifest. The type is used to support * downgrades by causing the actions defined in precomplete to be performed. * * precomplete * ----------- - * method = "remove" | "rmdir" | "remove-cc" - * - * 'remove-cc' is a remove action to perform on channel change. + * method = "remove" | "rmdir" */ #include "bspatch.h" #include "progressui.h" @@ -2440,13 +2436,12 @@ GetManifestContents(const NS_tchar *manifest) #endif } -int AddPreCompleteActions(ActionList *list, bool &isChannelChange) +int AddPreCompleteActions(ActionList *list) { NS_tchar *rb = GetManifestContents(NS_T("precomplete")); if (rb == NULL) { LOG(("AddPreCompleteActions: error getting contents of precomplete " \ "manifest\n")); - isChannelChange = false; // Applications aren't required to have a precomplete manifest yet. return OK; } @@ -2468,11 +2463,8 @@ int AddPreCompleteActions(ActionList *list, bool &isChannelChange) if (NS_tstrcmp(token, NS_T("remove")) == 0) { // rm file action = new RemoveFile(); } - else if (NS_tstrcmp(token, NS_T("remove-cc")) == 0) { // rm file - if (!isChannelChange) - continue; - - action = new RemoveFile(); + else if (NS_tstrcmp(token, NS_T("remove-cc")) == 0) { // no longer supported + continue; } else if (NS_tstrcmp(token, NS_T("rmdir")) == 0) { // rmdir if empty action = new RemoveDir(); @@ -2497,15 +2489,6 @@ int AddPreCompleteActions(ActionList *list, bool &isChannelChange) int DoUpdate() { - bool isChannelChange = false; - NS_tchar ccfile[MAXPATHLEN]; - NS_tsnprintf(ccfile, sizeof(ccfile)/sizeof(ccfile[0]), - NS_T("%s/channelchange"), gSourcePath); - if (!NS_taccess(ccfile, F_OK)) { - LOG(("DoUpdate: changing update channel\n")); - isChannelChange = true; - } - NS_tchar manifest[MAXPATHLEN]; NS_tsnprintf(manifest, sizeof(manifest)/sizeof(manifest[0]), NS_T("%s/update.manifest"), gSourcePath); @@ -2513,8 +2496,6 @@ int DoUpdate() // extract the manifest int rv = gArchiveReader.ExtractFile("updatev2.manifest", manifest); if (rv) { - // Don't allow changing the channel without a version 2 update manifest. - isChannelChange = false; rv = gArchiveReader.ExtractFile("update.manifest", manifest); if (rv) { LOG(("DoUpdate: error extracting manifest file\n")); @@ -2550,14 +2531,10 @@ int DoUpdate() LOG(("UPDATE TYPE " LOG_S "\n", type)); if (NS_tstrcmp(type, NS_T("complete")) == 0) { isComplete = true; - rv = AddPreCompleteActions(&list, isChannelChange); + rv = AddPreCompleteActions(&list); if (rv) return rv; } - else if (isChannelChange) { - LOG(("DoUpdate: unable to change channel with a partial update\n")); - isChannelChange = false; - } isFirstAction = false; continue; } @@ -2597,19 +2574,8 @@ int DoUpdate() else if (NS_tstrcmp(token, NS_T("patch-if")) == 0) { // Patch if exists action = new PatchIfFile(); } - else if (NS_tstrcmp(token, NS_T("add-cc")) == 0) { // Add if channel change - // The channel should only be changed with a complete update and when the - // user requests a channel change to avoid overwriting the update channel - // when testing RC's. - - // add-cc instructions should only be in complete update manifests. - if (!isComplete) - return PARSE_ERROR; - - if (!isChannelChange) - continue; - - action = new AddFile(); + else if (NS_tstrcmp(token, NS_T("add-cc")) == 0) { // no longer supported + continue; } else { LOG(("DoUpdate: unknown token: " LOG_S "\n", token)); diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp index 507457ad864b..57d68bec2466 100644 --- a/toolkit/xre/nsUpdateDriver.cpp +++ b/toolkit/xre/nsUpdateDriver.cpp @@ -216,12 +216,6 @@ GetVersionFile(nsIFile *dir, nsCOMPtr &result) return GetFile(dir, NS_LITERAL_CSTRING("update.version"), result); } -static bool -GetChannelChangeFile(nsIFile *dir, nsCOMPtr &result) -{ - return GetFile(dir, NS_LITERAL_CSTRING("channelchange"), result); -} - // Compares the current application version with the update's application // version. static bool @@ -539,13 +533,11 @@ ProcessUpdates(nsIFile *greDir, nsIFile *appDir, nsIFile *updRootDir, if (GetStatusFile(updatesDir, statusFile) && IsPending(statusFile)) { nsCOMPtr versionFile; - nsCOMPtr channelChangeFile; // Remove the update if the update application version file doesn't exist // or if the update's application version is less than the current // application version. - if (!GetChannelChangeFile(updatesDir, channelChangeFile) && - (!GetVersionFile(updatesDir, versionFile) || - IsOlderVersion(versionFile, appVersion))) { + if (!GetVersionFile(updatesDir, versionFile) || + IsOlderVersion(versionFile, appVersion)) { updatesDir->Remove(true); } else { ApplyUpdate(greDir, updatesDir, statusFile, appDir, diff --git a/tools/update-packaging/make_full_update.sh b/tools/update-packaging/make_full_update.sh index 09d1954786d5..3c0facf183d4 100755 --- a/tools/update-packaging/make_full_update.sh +++ b/tools/update-packaging/make_full_update.sh @@ -61,9 +61,6 @@ fi list_files files -# Files that should be added on channel change -ccfiles=$(find . -type f -name "channel-prefs.js" | sed 's/\.\/\(.*\)/\1/') - popd notice "" @@ -93,19 +90,6 @@ notice "Adding type instruction to file 'updatev2.manifest'" notice " type: complete" echo "type \"complete\"" >> $updatemanifestv2 -notice "" -notice "Adding file ADD instructions for channel change to file 'updatev2.manifest'" -for f in $ccfiles; do - notice " add-cc: $f" - echo "add-cc \"$f\"" >> $updatemanifestv2 - dir=$(dirname "$f") - mkdir -p "$workdir/$dir" - $BZIP2 -cz9 "$targetdir/$f" > "$workdir/$f" - copy_perm "$targetdir/$f" "$workdir/$f" - - targetfiles="$targetfiles \"$f\"" -done - notice "" notice "Concatenating file 'update.manifest' to file 'updatev2.manifest'" cat $updatemanifestv1 >> $updatemanifestv2 diff --git a/tools/update-packaging/make_incremental_update.sh b/tools/update-packaging/make_incremental_update.sh index eaa22e2bb4fa..de7e601112e4 100755 --- a/tools/update-packaging/make_incremental_update.sh +++ b/tools/update-packaging/make_incremental_update.sh @@ -115,9 +115,6 @@ fi list_dirs newdirs list_files newfiles -# Files that should be added on channel change -ccfiles=$(find . -type f -name "channel-prefs.js" | sed 's/\.\/\(.*\)/\1/') - popd notice "" diff --git a/tools/update-packaging/test/make_full_update.sh b/tools/update-packaging/test/make_full_update.sh index 4503cfe03256..933d2384ac41 100755 --- a/tools/update-packaging/test/make_full_update.sh +++ b/tools/update-packaging/test/make_full_update.sh @@ -62,9 +62,6 @@ fi list_files files -# Files that should be added on channel change -ccfiles=$(find . -type f -name "channel-prefs.js" | sed 's/\.\/\(.*\)/\1/') - popd notice "" @@ -94,19 +91,6 @@ notice "Adding type instruction to file 'updatev2.manifest'" notice " type: complete" echo "type \"complete\"" >> $updatemanifestv2 -notice "" -notice "Adding file add on channel change instructions to file 'updatev2.manifest'" -for f in $ccfiles; do - notice " add-cc: $f" - echo "add-cc \"$f\"" >> $updatemanifestv2 - dir=$(dirname "$f") - mkdir -p "$workdir/$dir" - $BZIP2 -cz9 "$targetdir/$f" > "$workdir/$f" - copy_perm "$targetdir/$f" "$workdir/$f" - - targetfiles="$targetfiles \"$f\"" -done - notice "" notice "Concatenating file 'update.manifest' to file 'updatev2.manifest'" cat $updatemanifestv1 >> $updatemanifestv2