List:Commits« Previous MessageNext Message »
From:Iggy Galarza Date:April 8 2011 3:15pm
Subject:bzr commit into wex-installer-1.0 branch (iggy:425)
View as plain text  
#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:mike.lischke@stripped

  425 Iggy Galarza	2011-04-08
      Product - Handle newer installed products.
      manifest-base - Added Connector J

    modified:
      Setup/manifest-base.xml
      WexInstaller.Core/Product.cs
=== modified file 'Setup/manifest-base.xml'
--- a/Setup/manifest-base.xml	2011-04-06 12:58:23 +0000
+++ b/Setup/manifest-base.xml	2011-04-08 15:15:13 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ProductManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="5" format="1">
+<ProductManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="6" format="1">
   <UpdateURL></UpdateURL>
   <UpdateVersion></UpdateVersion>
   <UpdateHash></UpdateHash>
@@ -18,6 +18,7 @@
         <CatalogProduct productId="connector-odbc-win32" setupTypeFlags="5" />
         <CatalogProduct productId="connector-c-win32" setupTypeFlags="5" />
         <CatalogProduct productId="connector-cpp-win32" setupTypeFlags="5" />
+        <CatalogProduct productId="connector-j-win32" setupTypeFlags="5" />
         <CatalogProduct productId="examples-5.5" setupTypeFlags="5"/>
         <CatalogProduct productId="documents-5.5" setupTypeFlags="5"/>
       </CatalogProducts>
@@ -36,6 +37,7 @@
         <CatalogProduct productId="connector-odbc-winx64" setupTypeFlags="5" />
         <CatalogProduct productId="connector-c-winx64" setupTypeFlags="5" />
         <CatalogProduct productId="connector-cpp-winx64" setupTypeFlags="5" />
+        <CatalogProduct productId="connector-j-win32" setupTypeFlags="5" />
         <CatalogProduct productId="examples-5.5" setupTypeFlags="5"/>
         <CatalogProduct productId="documents-5.5" setupTypeFlags="5"/>
       </CatalogProducts>
@@ -54,6 +56,7 @@
         <CatalogProduct productId="connector-odbc-win32" setupTypeFlags="5" />
         <CatalogProduct productId="connector-c-win32" setupTypeFlags="5" />
         <CatalogProduct productId="connector-cpp-win32" setupTypeFlags="5" />
+        <CatalogProduct productId="connector-j-win32" setupTypeFlags="5" />
         <CatalogProduct productId="examples-5.1" setupTypeFlags="5"/>
         <CatalogProduct productId="documents-5.1" setupTypeFlags="5"/>
       </CatalogProducts>
@@ -72,6 +75,7 @@
         <CatalogProduct productId="connector-odbc-winx64" setupTypeFlags="5" />
         <CatalogProduct productId="connector-c-winx64" setupTypeFlags="5" />
         <CatalogProduct productId="connector-cpp-winx64" setupTypeFlags="5" />
+        <CatalogProduct productId="connector-j-win32" setupTypeFlags="5" />
         <CatalogProduct productId="examples-5.1" setupTypeFlags="5"/>
         <CatalogProduct productId="documents-5.1" setupTypeFlags="5"/>
       </CatalogProducts>
@@ -148,6 +152,12 @@
           </Package>
         </Packages>
       </Product>
+      <Product name="connector-j-win32" title="Connector/J" description="MySQL Connector for Java" upgradeId="" urlBaseDir="">
+        <Packages>
+          <Package type="MSI" arch="X86" filename="mysql-connector-J-5.1.15.msi" id="" thisVersion="">
+          </Package>
+        </Packages>
+      </Product>
     </ProductCategory>
     <ProductCategory name="Documentation" title="Documentation" description="">
       <Product name="documents-5.5" title="MySQL Documentation" description="A collection of popular MySQL Documents" upgradeId="" urlBaseDir="http://wb.mysql.com/installer">

=== modified file 'WexInstaller.Core/Product.cs'
--- a/WexInstaller.Core/Product.cs	2011-04-07 15:29:37 +0000
+++ b/WexInstaller.Core/Product.cs	2011-04-08 15:15:13 +0000
@@ -982,22 +982,18 @@ namespace WexInstaller.Core
                             haveNewer = true;
                         }
 
-                      if (haveNewer)
+                      foundUpgradeableProducts = PopulateRelatePackageFeatures(possibleOlderPackage);
+                      if (foundUpgradeableProducts)
                       {
-                        foundUpgradeableProducts = PopulateRelatePackageFeatures(possibleOlderPackage);
-                        if (foundUpgradeableProducts)
+                        possibleOlderPackage.PostInitialize();
+                        possibleOlderPackage.UrlBase = p.UrlBase;
+                        if (!haveNewer)
                         {
-                          possibleOlderPackage.PostInitialize();
-                          possibleOlderPackage.UrlBase = p.UrlBase;
-                          Packages.Add(possibleOlderPackage);
+                          // The machine has a package installed that's newer than our manifest.
+                          // Our manfest's package is outdated so toss it.
+                          Packages.Clear();
                         }
-                      }
-                      else
-                      {
-                        // The install will fail because a newer version of the product is already installed.  
-                        // Maybe, the current package should be replaced with a from memory version since everything is INSTALLED?
-                        // TODO: warn the user that this product is already installed and won't be installed again by this installer.
-                        Logger.LogError("A newer product is already installed but we're not sure what to do with it yet so hold this place.");
+                        Packages.Add(possibleOlderPackage);
                       }
                     }
                   }


Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110408151513-71586d6564c5lhjg.bundle
Thread
bzr commit into wex-installer-1.0 branch (iggy:425) Iggy Galarza8 Apr