Bug 735784 - Workaround for 13.0a1 users who are getting version downgrade errors. r=rstrong
authorBrian R. Bondy <netzen@gmail.com>
Wed, 14 Mar 2012 22:42:42 -0400
changeset 92678 eb7d13ddeeafe989c703b7877b0a7630f191da2a
parent 92677 d0d13f09be4463e4a8ccaebd899156df7abb3ec1
child 92743 082d016c341f14170459abacb74718ec6f34ed21
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs735784
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 735784 - Workaround for 13.0a1 users who are getting version downgrade errors. r=rstrong
modules/libmar/tool/mar.c
toolkit/mozapps/update/updater/archivereader.cpp
--- a/modules/libmar/tool/mar.c
+++ b/modules/libmar/tool/mar.c
@@ -169,17 +169,18 @@ int main(int argc, char **argv) {
     print_usage();
     return -1;
   }
 
   switch (argv[1][1]) {
   case 'c': {
     struct ProductInformationBlock infoBlock;
     infoBlock.MARChannelID = MARChannelID;
-    infoBlock.productVersion = productVersion;
+    // Temporarily hardcoded - see Bug 735784
+    infoBlock.productVersion = "13.0a1";//productVersion;
     return mar_create(argv[2], argc - 3, argv + 3, &infoBlock);
   }
   case 'i': {
     struct ProductInformationBlock infoBlock;
     infoBlock.MARChannelID = MARChannelID;
     infoBlock.productVersion = productVersion;
     return refresh_product_info_block(argv[2], &infoBlock);
   }
--- a/toolkit/mozapps/update/updater/archivereader.cpp
+++ b/toolkit/mozapps/update/updater/archivereader.cpp
@@ -214,32 +214,35 @@ ArchiveReader::VerifyProductInformation(
       if (!strcmp(channel, productInfoBlock.MARChannelID)) {
         rv = OK;
         break;
       }
       channel = strtok(NULL, delimiter);
     }
   }
 
+// Temporarily disabled - see Bug 735784
+#if 0
   if (rv == OK) {
     /* Compare both versions to ensure we don't have a downgrade
         -1 if appVersion is older than productInfoBlock.productVersion
         1 if appVersion is newer than productInfoBlock.productVersion
         0 if appVersion is the same as productInfoBlock.productVersion
        This even works with strings like:
         - 12.0a1 being older than 12.0a2
         - 12.0a2 being older than 12.0b1
         - 12.0a1 being older than 12.0
         - 12.0 being older than 12.1a1 */
     int versionCompareResult = 
       NS_CompareVersions(appVersion, productInfoBlock.productVersion);
     if (1 == versionCompareResult) {
       rv = VERSION_DOWNGRADE_ERROR;
     }
   }
+#endif
 
   free((void *)productInfoBlock.MARChannelID);
   free((void *)productInfoBlock.productVersion);
   return rv;
 }
 
 int
 ArchiveReader::Open(const NS_tchar *path)