Hello community, here is the log from the commit of package OpenOffice_org-components for openSUSE:Factory checked in at Mon Mar 30 18:15:59 CEST 2009. -------- --- OpenOffice_org-components/OpenOffice_org-components.changes 2009-03-20 16:10:33.000000000 +0100 +++ OpenOffice_org-components/OpenOffice_org-components.changes 2009-03-27 21:17:44.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Mar 27 21:17:08 CET 2009 - pmladek@suse.cz + +- updated to the milestone ooo310-m7 +- updated ooo-build to version 3.0.99.3 (3.1-beta3) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- ooo310-m6-components.tar.bz2 New: ---- ooo310-m7-components.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ OpenOffice_org-components.spec ++++++ --- /var/tmp/diff_new_pack.K30663/_old 2009-03-30 18:15:30.000000000 +0200 +++ /var/tmp/diff_new_pack.K30663/_new 2009-03-30 18:15:30.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package OpenOffice_org-components (Version 3.0.99.2) +# spec file for package OpenOffice_org-components (Version 3.0.99.3) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,9 +19,9 @@ Name: OpenOffice_org-components -Version: 3.0.99.2 +Version: 3.0.99.3 Release: 1 -%define ooo_build_version 3.0.99.2 +%define ooo_build_version 3.0.99.3 %define piece components #!BuildIgnore: OpenOffice_org BuildRequires: OpenOffice_org-artwork-devel = %version @@ -47,7 +47,7 @@ %endif %define ooo_prefix %_libdir %define ooo_home ooo3 -%define ooo_build_tag ooo310-m6 +%define ooo_build_tag ooo310-m7 License: Artistic License; BSD 3-Clause; GPL v2 or later; LaTeX Public License (LPPL); LGPL v2.1 or later; LGPL v3 only; MOZILLA PUBLIC LICENSE (MPL/NPL); X11/MIT Group: Productivity/Office/Suite AutoReqProv: on @@ -203,6 +203,9 @@ %ooo_prefix/%ooo_home/solver/noarch %changelog +* Fri Mar 27 2009 pmladek@suse.cz +- updated to the milestone ooo310-m7 +- updated ooo-build to version 3.0.99.3 (3.1-beta3) * Fri Mar 20 2009 pmladek@suse.cz - updated to the milestone ooo310-m6 - updated ooo-build to version 3.0.99.2 (3.1-beta2) ++++++ ooo310-m6-components.tar.bz2 -> ooo310-m7-components.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java 2008-07-22 14:02:28.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java 2009-03-20 10:46:04.000000000 +0100 @@ -84,6 +84,14 @@ Vector sortedPackages = new Vector(); PackageCollector.sortPackages(installPackages, sortedPackages, "install"); installData.setInstallPackages(sortedPackages); + + if ( installData.isMajorUpgrade() ) { + // PackageCollector.findOldPackages(installData); + // Sorting for correct order of uninstallation + Vector sortedUninstallPackages = new Vector(); + PackageCollector.sortPackages(installData.getOldPackages(), sortedUninstallPackages, "uninstall"); + installData.setOldPackages(sortedUninstallPackages); + } Installer installer = InstallerFactory.getInstance(); installer.preInstallationOngoing(); @@ -96,6 +104,7 @@ InstallData installData = InstallData.getInstance(); InstallationOngoing panel = (InstallationOngoing)getPanel(); Vector installPackages = installData.getInstallPackages(); + Vector removePackages = installData.getOldPackages(); private Vector installedPackages = new Vector(); public void run() { @@ -110,6 +119,18 @@ panel.setProgressValue(progress); panel.setProgressText(packageData.getPackageName()); + // Creating an upgrade process for Solaris packages + if ( installData.getOSType().equalsIgnoreCase("SunOS") ) { + if ( installer.isPackageInstalled(packageData, installData) ) { + if ( installer.isInstalledPackageOlder(packageData, installData) ) { + packageData.setIgnoreDependsForUninstall(true); + installer.uninstallPackage(packageData); + } else { + continue; // no downgrading + } + } + } + installer.installPackage(packageData); installedPackages.add(packageData); @@ -118,6 +139,13 @@ } } + if ( installData.isMajorUpgrade() ) { + for (int i = 0; i < removePackages.size(); i++) { + PackageDescription packageData = (PackageDescription) removePackages.get(i); + installer.uninstallPackage(packageData); + } + } + if ( installData.isAbortedInstallation() ) { // undoing the installation LogManager.setCommandsHeaderLine("Installation aborted!"); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java 2008-09-26 16:44:20.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java 2009-03-20 10:46:04.000000000 +0100 @@ -95,7 +95,9 @@ // adding information to installData data.setPackagePath((String)map.get("PackagePath")); data.setAdminFileNameReloc((String)map.get("AdminFileReloc")); + data.setAdminFileNameRelocNoDepends((String)map.get("AdminFileRelocNoDepends")); data.setAdminFileNameNoReloc((String)map.get("AdminFileNoReloc")); + data.setAdminFileNameNoRelocNoDepends((String)map.get("AdminFileNoRelocNoDepends")); data.setDatabasePath((String)map.get("DatabasePath")); data.setInstallDir((String)map.get("InstallationDir")); data.setStoredInstallationPrivileges((String)map.get("InstallationPrivileges")); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java 2009-02-17 14:05:11.000000000 +0100 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java 2009-03-20 10:46:04.000000000 +0100 @@ -71,11 +71,13 @@ static private boolean olderVersionExists = false; static private boolean sameVersionExists = false; static private boolean newerVersionExists = false; + static private boolean majorUpgrade = false; static private boolean isMultiLingual = false; static private boolean dontUpdate = false; static private boolean hideEula = false; static private boolean databaseQueried = false; static private boolean useRtl = false; + static private boolean installedProductMinorSet = false; static private String installType; /* custom or typical installation */ static private String osType; /* Linux, SunOS, ... */ static private String installDir = null; @@ -87,7 +89,9 @@ static private String packagePath = null; static private String packageSubdir = "packages"; static private String adminFileNameReloc = null; + static private String adminFileNameRelocNoDepends = null; static private String adminFileNameNoReloc = null; + static private String adminFileNameNoRelocNoDepends = null; static private String databasePath = null; static private String getUidPath = null; static private String installationPrivileges = null; @@ -97,6 +101,8 @@ static private String uninstallDirName = "uninstalldata"; static private int availableDiscSpace = 0; static private int preselectedLanguages = 0; + static private int productMinor = 0; + static private int installedProductMinor = 0; static private File jarFilePath = null; static private File resourceRoot; static private File infoRoot; @@ -105,6 +111,7 @@ static private PackageDescription updatePackage = null; static private Vector removeFiles = new Vector(); /* Files to remove, if installation is aborted */ static private Vector installPackages = new Vector(); + static private Vector oldPackages = new Vector(); static private Vector systemLanguages = new Vector(); public static InstallData getInstance() @@ -290,6 +297,22 @@ productDir = dir; } + public int getProductMinor() { + return productMinor; + } + + public void setProductMinor(int minor) { + productMinor = minor; + } + + public int getInstalledProductMinor() { + return installedProductMinor; + } + + public void setInstalledProductMinor(int minor) { + installedProductMinor = minor; + } + public String getInstallDirName() { return installDirName; } @@ -389,6 +412,14 @@ adminFileNameReloc = fileName; } + public String getAdminFileNameRelocNoDepends() { + return adminFileNameRelocNoDepends; + } + + public void setAdminFileNameRelocNoDepends(String fileName) { + adminFileNameRelocNoDepends = fileName; + } + public String getAdminFileNameNoReloc() { return adminFileNameNoReloc; } @@ -396,6 +427,14 @@ public void setAdminFileNameNoReloc(String fileName) { adminFileNameNoReloc = fileName; } + + public String getAdminFileNameNoRelocNoDepends() { + return adminFileNameNoRelocNoDepends; + } + + public void setAdminFileNameNoRelocNoDepends(String fileName) { + adminFileNameNoRelocNoDepends = fileName; + } public String getGetUidPath() { return getUidPath; @@ -565,6 +604,14 @@ olderVersionExists = exists; } + public boolean isMajorUpgrade() { + return majorUpgrade; + } + + public void setMajorUpgrade(boolean upgrade) { + majorUpgrade = upgrade; + } + public boolean sameVersionExists() { return sameVersionExists; } @@ -597,6 +644,14 @@ hideEula = value; } + public boolean installedProductMinorSet() { + return installedProductMinorSet; + } + + public void setInstalledProductMinorSet(boolean value) { + installedProductMinorSet = value; + } + public boolean databaseQueried() { return databaseQueried; } @@ -637,6 +692,14 @@ installPackages = packages; } + public Vector getOldPackages() { + return oldPackages; + } + + public void setOldPackages(Vector packages) { + oldPackages = packages; + } + public Vector getSystemLanguages() { return systemLanguages; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java 2008-07-17 18:27:34.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java 2009-03-20 10:46:04.000000000 +0100 @@ -409,12 +409,17 @@ log = rpmCommand + "<br><b>Returns: " + returnValue + " Successful uninstallation</b><br>"; LogManager.addCommandsLogfileComment(log); } else { // an error occured during installation - log = rpmCommand + "<br><b>Returns: " + returnValue + " Error during uninstallation</b><br>"; - LogManager.addCommandsLogfileComment(log); - for (int i = 0; i < returnErrorVector.size(); i++) { - LogManager.addCommandsLogfileComment((String)returnErrorVector.get(i)); + if ( packageData.uninstallCanFail() ) { + log = rpmCommand + "<br><b>Returns: " + returnValue + " Problem during uninstallation. Can be ignored.</b><br>"; + LogManager.addCommandsLogfileComment(log); + } else { + log = rpmCommand + "<br><b>Returns: " + returnValue + " Error during uninstallation</b><br>"; + LogManager.addCommandsLogfileComment(log); + for (int i = 0; i < returnErrorVector.size(); i++) { + LogManager.addCommandsLogfileComment((String)returnErrorVector.get(i)); + } + data.setIsErrorInstallation(true); } - data.setIsErrorInstallation(true); } } } @@ -538,7 +543,8 @@ String onePackage = (String)returnVector.get(i); int pos1 = onePackage.lastIndexOf("-"); int pos2 = onePackage.substring(0, pos1).lastIndexOf("-"); - map.put(onePackage.substring(0, pos2), value); + String key = onePackage.substring(0, pos2); + map.put(key, value); } } @@ -667,6 +673,12 @@ log = rpmCommand + "<br><b>Returns: " + version + "</b><br>"; LogManager.addCommandsLogfileComment(log); + if ( ! installData.installedProductMinorSet() ) { + int productMinor = helper.getInstalledMinor(version); + installData.setInstalledProductMinor(productMinor); + installData.setInstalledProductMinorSet(true); + } + if (useLocalDatabase) { rpmCommand = "rpm" + " " + databaseString + " " + databasePath + " -q --queryformat %{RELEASE}\\n " + packageName; rpmCommandArray[5] = "%{RELEASE}\\n"; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java 2008-06-24 12:15:01.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java 2009-03-20 10:46:04.000000000 +0100 @@ -81,8 +81,11 @@ if ( data.isInstallationMode()) { boolean makeRelocatableAdminFile = true; - helper.createAdminFile(makeRelocatableAdminFile); - helper.createAdminFile(! makeRelocatableAdminFile); + boolean removeDepends = true; + helper.createAdminFile(makeRelocatableAdminFile, removeDepends); + helper.createAdminFile(makeRelocatableAdminFile, ! removeDepends); + helper.createAdminFile(! makeRelocatableAdminFile, removeDepends); + helper.createAdminFile(! makeRelocatableAdminFile, ! removeDepends); } if ( data.isUserInstallation() ) { @@ -259,9 +262,17 @@ // is package relocatable or not? if ( packageData.isRelocatable() ) { - adminFileName = data.getAdminFileNameReloc(); + if ( packageData.ignoreDependsForUninstall() ) { // Force removal of older packages during installation + adminFileName = data.getAdminFileNameRelocNoDepends(); + } else { + adminFileName = data.getAdminFileNameReloc(); + } } else { - adminFileName = data.getAdminFileNameNoReloc(); + if ( packageData.ignoreDependsForUninstall() ) { // Force removal of older packages during installation + adminFileName = data.getAdminFileNameNoRelocNoDepends(); + } else { + adminFileName = data.getAdminFileNameNoReloc(); + } } String pkgCommand = ""; @@ -300,16 +311,20 @@ log = pkgCommand + "<br><b>Returns: " + returnValue + " Successful uninstallation</b><br>"; LogManager.addCommandsLogfileComment(log); } else { // an error occured during installation - log = pkgCommand + "<br><b>Returns: " + returnValue + " Error during uninstallation</b><br>"; - LogManager.addCommandsLogfileComment(log); - System.err.println("Error during uninstallation:"); - for (int i = 0; i < returnErrorVector.size(); i++) { - LogManager.addCommandsLogfileComment((String)returnErrorVector.get(i)); - System.err.println(returnErrorVector.get(i)); + if ( packageData.uninstallCanFail() ) { + log = pkgCommand + "<br><b>Returns: " + returnValue + " Problem during uninstallation. Can be ignored.</b><br>"; + LogManager.addCommandsLogfileComment(log); + } else { + log = pkgCommand + "<br><b>Returns: " + returnValue + " Error during uninstallation</b><br>"; + LogManager.addCommandsLogfileComment(log); + System.err.println("Error during uninstallation:"); + for (int i = 0; i < returnErrorVector.size(); i++) { + LogManager.addCommandsLogfileComment((String)returnErrorVector.get(i)); + System.err.println(returnErrorVector.get(i)); + } + data.setIsErrorInstallation(true); } - data.setIsErrorInstallation(true); } - } public boolean isPackageNameInstalledClassic(String packageName, InstallData installData) { @@ -402,7 +417,8 @@ for (int i = 0; i < returnVector.size(); i++) { String onePackage = (String)returnVector.get(i); int pos1 = onePackage.indexOf(" "); - map.put(onePackage.substring(0, pos1), value); + String key = onePackage.substring(0, pos1); + map.put(key, value); } } @@ -521,6 +537,12 @@ String installedPackageVersion = helper.getVersionString(returnVector); String newPackageVersion = packageData.getPkgVersion(); + + if ( ! installData.installedProductMinorSet() ) { + int productMinor = helper.getInstalledMinor(installedPackageVersion); + installData.setInstalledProductMinor(productMinor); + installData.setInstalledProductMinorSet(true); + } if (( installedPackageVersion != null ) && ( newPackageVersion != null )) { if ( checkIfInstalledIsOlder ) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java 2008-05-06 12:44:22.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java 2009-03-20 10:46:04.000000000 +0100 @@ -240,6 +240,23 @@ return hashRpm; } + + public int getInstalledMinor(String version) { + + int minor = 0; + int pos = version.indexOf("."); + if ( pos > -1 ) { + String reduced = version.substring(pos + 1, version.length()); + + pos = reduced.indexOf("."); + if ( pos > -1 ) { + reduced = reduced.substring(0, pos); + minor = Integer.parseInt(reduced); + } + } + + return minor; + } private boolean compareTwoRpms(HashMap hash1, HashMap hash2) { boolean hash1IsOlder = false; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java 2009-01-20 13:48:05.000000000 +0100 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java 2009-03-20 10:46:04.000000000 +0100 @@ -108,7 +108,7 @@ } } - private Vector getAdminFileContent(boolean relocatable) { + private Vector getAdminFileContent(boolean relocatable, boolean rdepends) { Vector adminFile = new Vector(); InstallData data = InstallData.getInstance(); @@ -151,6 +151,7 @@ // String rdependLine = "rdepend=nocheck"; String rdependLine = "rdepend=quit"; + if ( ! rdepends ) { rdependLine = "rdepend=nocheck"; } if ( data.isUserInstallation() ) { rdependLine = "rdepend=nocheck"; } adminFile.add(rdependLine); @@ -268,25 +269,41 @@ return databasePath; } - public void createAdminFile(boolean relocatable) { + public void createAdminFile(boolean relocatable, boolean rdepends) { InstallData data = InstallData.getInstance(); Vector removeFiles = data.getRemoveFiles(); String adminFileName = ""; if ( relocatable ) { - adminFileName = "adminFileReloc"; + if ( rdepends ) { + adminFileName = "adminFileReloc"; + } else { + adminFileName = "adminFileRelocNoDepends"; + } } else { - adminFileName = "adminFileNoReloc"; + if ( rdepends ) { + adminFileName = "adminFileNoReloc"; + } else { + adminFileName = "adminFileNoRelocNoDepends"; + } } - Vector fileContent = getAdminFileContent(relocatable); + Vector fileContent = getAdminFileContent(relocatable, rdepends); File adminFile = new File(data.getInstallDir(), adminFileName); String completeAdminFileName = adminFile.getPath(); if ( relocatable ) { - data.setAdminFileNameReloc(completeAdminFileName); + if ( rdepends ) { + data.setAdminFileNameReloc(completeAdminFileName); + } else { + data.setAdminFileNameRelocNoDepends(completeAdminFileName); + } } else { - data.setAdminFileNameNoReloc(completeAdminFileName); + if ( rdepends ) { + data.setAdminFileNameNoReloc(completeAdminFileName); + } else { + data.setAdminFileNameNoRelocNoDepends(completeAdminFileName); + } } if ( ! adminFile.exists() ) { @@ -331,6 +348,24 @@ return versionString; } + public int getInstalledMinor(String version) { + + int minor = 0; + + int pos = version.indexOf("."); + if ( pos > -1 ) { + String reduced = version.substring(pos + 1, version.length()); + + pos = reduced.indexOf("."); + if ( pos > -1 ) { + reduced = reduced.substring(0, pos); + minor = Integer.parseInt(reduced); + } + } + + return minor; + } + public boolean comparePackageVersions(String firstPackageVersion, String secondPackageVersion) { // Analyzing strings: version, 2.0.0,REV=106.2005.05.26 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java 2008-08-27 13:31:21.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java 2009-03-20 10:46:04.000000000 +0100 @@ -103,9 +103,12 @@ private boolean isApplicationPackage = false; private boolean isJavaPackage = false; private boolean installCanFail = false; + private boolean uninstallCanFail = false; + private boolean forceIntoUpdate = false; private boolean useForce = false; private boolean isNewInstalled = false; private boolean wasAlreadyInstalled = false; + private boolean ignoreDependsForUninstall = false; /* Saving the default selection state. This is necessary, if the user chooses * the custom installation type, makes changes, and then changes into @@ -117,6 +120,8 @@ private int typicalSelectionState = DONT_KNOW; // Saving settings for typical installation private int customSelectionState = DONT_KNOW; // Saving settings for custom installation private int startSelectionState = DONT_KNOW; // Saving settings at start of installation + + public PackageDescription() {} /** * construct only with package information to wrap @@ -142,6 +147,10 @@ public String getName() { return dpyName; } + + public void setName(String name) { + dpyName = name; + } public String getDescription() { return dpyDescription; @@ -163,6 +172,10 @@ return pkgOrder; } + public void setOrder(int order) { + pkgOrder = order; + } + // public int getAccumulatedSize() { // int size = getSize(); // @@ -215,6 +228,18 @@ return installCanFail; } + public boolean uninstallCanFail() { + return uninstallCanFail; + } + + public void setUninstallCanFail(boolean canFail) { + uninstallCanFail = canFail; + } + + public boolean forceIntoUpdate() { + return forceIntoUpdate; + } + public boolean useForce() { return useForce; } @@ -235,6 +260,14 @@ return wasAlreadyInstalled; } + public void setIgnoreDependsForUninstall(boolean ignore) { + ignoreDependsForUninstall = ignore; + } + + public boolean ignoreDependsForUninstall() { + return ignoreDependsForUninstall; + } + public boolean isDefault() { return isDefault; } @@ -246,11 +279,20 @@ public boolean isRelocatable() { return isRelocatable; } + + public void setIsRelocatable(boolean relocatable) { + isRelocatable = relocatable; + } public String getPackageName() { return pkgFileName; } + public void setPackageName(String name) { + pkgFileName = name; + } + + public String getFullPackageName() { return pkgFullName; } @@ -468,6 +510,12 @@ installCanFail = Parser.parseBoolean(installCanFailValue); } + subSection = section.getElement("forceintoupdate"); + if (subSection != null) { + String forceIntoUpdateValue = subSection.getValue(); + forceIntoUpdate = Parser.parseBoolean(forceIntoUpdateValue); + } + subSection = section.getElement("useforce"); if (subSection != null) { String useForceValue = subSection.getValue(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java 2008-05-06 12:45:24.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java 2009-03-20 10:46:04.000000000 +0100 @@ -239,7 +239,17 @@ installData.setDontUpdate(dontupdate); } - section = data.getElement("hideeula"); + /* check for the Product Minor of this installation set */ + section = data.getElement("productminor"); + if (section != null) { + String value = section.getValue(); + if (value != null) { + int intValue = Integer.parseInt(value); + installData.setProductMinor(intValue); + } + } + + section = data.getElement("hideeula"); if (section != null) { String value = section.getValue(); if ((value != null) && (! value.equals(""))) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java 2008-05-06 12:46:38.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java 2009-03-20 10:46:04.000000000 +0100 @@ -179,7 +179,9 @@ InstallData data = InstallData.getInstance(); System.err.println("PackagePath: " + data.getPackagePath()); System.err.println("AdminFileReloc: " + data.getAdminFileNameReloc()); + System.err.println("AdminFileRelocNoDepends: " + data.getAdminFileNameRelocNoDepends()); System.err.println("AdminFileNoReloc: " + data.getAdminFileNameNoReloc()); + System.err.println("AdminFileNoRelocNoDepends: " + data.getAdminFileNameNoRelocNoDepends()); System.err.println("DatabasePath: " + data.getDatabasePath()); System.err.println("InstallDir: " + data.getInstallDir()); System.err.println("Original privileges: " + data.getStoredInstallationPrivileges()); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java 2008-08-01 13:19:35.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java 2009-03-20 10:46:04.000000000 +0100 @@ -157,6 +157,15 @@ data.setAdminFileNameReloc(destFile.getPath()); sourceFile.delete(); } + + if ( data.getAdminFileNameRelocNoDepends() != null ) { + File sourceFile = new File(data.getAdminFileNameRelocNoDepends()); + String fileName = sourceFile.getName(); + File destFile = new File(dir, fileName); + boolean success = SystemManager.copy(sourceFile.getPath(), destFile.getPath()); + data.setAdminFileNameRelocNoDepends(destFile.getPath()); + sourceFile.delete(); + } if ( data.getAdminFileNameNoReloc() != null ) { File sourceFile = new File(data.getAdminFileNameNoReloc()); @@ -167,6 +176,14 @@ sourceFile.delete(); } + if ( data.getAdminFileNameNoRelocNoDepends() != null ) { + File sourceFile = new File(data.getAdminFileNameNoRelocNoDepends()); + String fileName = sourceFile.getName(); + File destFile = new File(dir, fileName); + boolean success = SystemManager.copy(sourceFile.getPath(), destFile.getPath()); + data.setAdminFileNameNoRelocNoDepends(destFile.getPath()); + sourceFile.delete(); + } } static private void createInfoFile(File dir) { @@ -180,8 +197,12 @@ fileContent.add(line); line = "AdminFileReloc=" + data.getAdminFileNameReloc(); fileContent.add(line); + line = "AdminFileRelocNoDepends=" + data.getAdminFileNameRelocNoDepends(); + fileContent.add(line); line = "AdminFileNoReloc=" + data.getAdminFileNameNoReloc(); fileContent.add(line); + line = "AdminFileNoRelocNoDepends=" + data.getAdminFileNameNoRelocNoDepends(); + fileContent.add(line); line = "InstallationDir=" + data.getInstallDir(); fileContent.add(line); line = "DatabasePath=" + data.getDatabasePath(); @@ -207,10 +228,18 @@ SystemManager.deleteFile(new File(data.getAdminFileNameReloc())); } + if ( ! data.getAdminFileNameRelocNoDepends().equals("null") ) { + SystemManager.deleteFile(new File(data.getAdminFileNameRelocNoDepends())); + } + if ( ! data.getAdminFileNameNoReloc().equals("null") ) { SystemManager.deleteFile(new File(data.getAdminFileNameNoReloc())); } + if ( ! data.getAdminFileNameNoRelocNoDepends().equals("null") ) { + SystemManager.deleteFile(new File(data.getAdminFileNameNoRelocNoDepends())); + } + if ( ! data.getGetUidPath().equals("null") ) { SystemManager.deleteFile(new File(data.getGetUidPath())); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java 2008-05-06 12:47:22.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java 2009-03-20 10:46:04.000000000 +0100 @@ -98,6 +98,13 @@ data.setOlderVersionExists(true); // All installed packages will be updated -> determining which packages are installed System.err.println("An older product is installed"); + // But if this is a kind of Major Upgrade with different Minor and therefore different package names, + // it is necessary to remove the old product. + if ( data.getProductMinor() > data.getInstalledProductMinor() ) + { + data.setMajorUpgrade(true); + System.err.println("Major Upgrade"); + } } else if ( installer.isInstallSetPackageOlder(data.getUpdatePackage(), data) ) { data.setNewerVersionExists(true); System.err.println("A newer product is installed"); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java 2008-09-26 16:44:20.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java 2009-03-20 10:46:04.000000000 +0100 @@ -180,10 +180,16 @@ // System.err.println("Setting allChildrenHidden for module " + packageData.getName() ); } - // System.err.println("Setting " + packageData.getName() + " to " + packageData.getSelectionState() ); - packageData.setSelectionState(state); + // If older version exist, only modules without packages shall be updated, + // because all packages are already determined by querying the database. + if ( installdata.olderVersionExists() ) { + if ( packageData.getPackageName().equals("") ) { + packageData.setSelectionState(state); + } + } else { + packageData.setSelectionState(state); + } } - } static public void setHiddenModuleSettingsInstall(PackageDescription packageData) { @@ -409,6 +415,18 @@ } } + static public void setForcedUpdateProductSettings(PackageDescription packageData) { + + if ( packageData.forceIntoUpdate() ) { + packageData.setSelectionState(PackageDescription.INSTALL); + } + + for (Enumeration e = packageData.children(); e.hasMoreElements(); ) { + PackageDescription child = (PackageDescription) e.nextElement(); + setForcedUpdateProductSettings(child); + } + } + static public void setShowInUserInstallOnlyFlags(PackageDescription packageData) { // This function is not needed during deinstallation, because a @@ -720,7 +738,51 @@ } } } else { - packageData.setSelectionState(PackageDescription.DONT_INSTALL); + packageData.setSelectionState(PackageDescription.DONT_INSTALL); + // Special handling for Major Upgrade + if ( data.isMajorUpgrade() ) { + String basis = "ooobasis3"; + if ( data.getOSType().equalsIgnoreCase("Linux") ) { basis = basis + "."; } + String search = basis + data.getProductMinor(); + String replacestring = basis + data.getInstalledProductMinor(); + int pos = packageData.getPackageName().indexOf(search); + if ( pos > -1 ) { + // Check if this package is installed with a lower product minor + // Creating new package for removal, very simple PackageDescription + PackageDescription localPackage = new PackageDescription(); + localPackage.setUninstallCanFail(true); + localPackage.setIsRelocatable(packageData.isRelocatable()); + String localName = packageData.getPackageName(); + localName = localName.replace(search, replacestring); + localPackage.setPackageName(localName); + + if ( ( packageData.getPkgRealName() != null ) && ( ! packageData.getPkgRealName().equals("") )) { + localName = packageData.getPkgRealName(); + localName = localName.replace(search, replacestring); + localPackage.setPkgRealName(localName); + } + + if (( packageData.getName() != null ) && ( ! packageData.getName().equals("") )) { + localName = packageData.getName(); + localName = localName.replace(search, replacestring); + localPackage.setName(localName); + } + + // saving also the order, needed for order of uninstallation + localPackage.setOrder(packageData.getOrder()); + + // If the old package is installed, the new package can be installed, too, + // and the old package can be marked for removal (with dependency check). + if ( installer.isPackageInstalled(localPackage, data) ) { + packageData.setSelectionState(PackageDescription.INSTALL); + + // Collecting all installed older packages for uninstallation + Vector oldPackages = data.getOldPackages(); + oldPackages.add(localPackage); + data.setOldPackages(oldPackages); + } + } + } } } @@ -841,6 +903,13 @@ Dumper.logModuleStates(packageData, "ChooseDirectory: After setUpdateOlderProductSettings"); } + // Setting packages that are forced into update, because they did not exist in older version. + ModuleCtrl.setForcedUpdateProductSettings(packageData); + + if ( data.logModuleStates() ) { + Dumper.logModuleStates(packageData, "ChooseDirectory: After setForcedUpdateProductSettings"); + } + // Setting required root module packages (that are new in the update product). ModuleCtrl.setRequiredNewCoreModules(packageData, data); @@ -870,6 +939,13 @@ Dumper.logModuleStates(packageData, "ChooseDirectory: After setShowInUserInstallOnlyFlags"); } } + + // Setting parent module settings. Only required for displaying correct module settings before starting installation. + ModuleCtrl.setParentDefaultModuleSettings(packageData); + + if ( data.logModuleStates() ) { + Dumper.logModuleStates(packageData, "ChooseDirectory: After setParentDefaultModuleSettings"); + } // Collecting packages to install // This has to be done here, because "ChooseInstallationType" and "ChooseComponents" @@ -903,7 +979,7 @@ Dumper.logModuleStates(packageData, "ChooseDirectory: After disableNonExistingPackages"); } - // disable packages, that are not valid in user installation + // disable packages, that are not valid in user installation if ( data.isUserInstallation() ) { ModuleCtrl.setShowInUserInstallFlags(packageData); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java --- old/ooo310-m6-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java 2008-04-15 16:52:36.000000000 +0200 +++ new/ooo310-m7-components/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java 2009-03-20 10:46:04.000000000 +0100 @@ -30,6 +30,7 @@ package org.openoffice.setup.Util; +import org.openoffice.setup.InstallData; import org.openoffice.setup.SetupData.PackageDescription; import java.util.Enumeration; import java.util.Vector; @@ -82,6 +83,62 @@ } } + // Special handling for packages, that change their name, and therefore need to be uninstalled + + // static public void findOldPackages( InstallData installData ) { + // + // String basis = "ooobasis3"; + // if ( installData.getOSType().equalsIgnoreCase("Linux") ) { basis = basis + "."; } + // String search = basis + installData.getProductMinor(); + + // Vector allPackages = installData.getInstallPackages(); + // Vector oldPackages = new Vector(); + + // for (int i = 0; i < allPackages.size(); i++) { + // PackageDescription packageData = (PackageDescription) allPackages.get(i); + // int pos = packageData.getPackageName().indexOf(search); + + // if ( pos > -1 ) { + // String substring = packageData.getPackageName().substring(pos, pos + 1); + // for (int j = 0; j < installData.getProductMinor(); j++) { + // String replace = basis + j; + // // Creating new package for removal, very simple PackageDescription + // PackageDescription localPackage = new PackageDescription(); + // localPackage.setUninstallCanFail(true); + // localPackage.setIsRelocatable(packageData.isRelocatable()); + // String localName = packageData.getPackageName(); + // localName = localName.replace(search, replace); + // localPackage.setPackageName(localName); + + // if ( ( packageData.getPkgRealName() != null ) && ( ! packageData.getPkgRealName().equals("") )) { + // localName = packageData.getPkgRealName(); + // localName = localName.replace(search, replace); + // localPackage.setPkgRealName(localName); + // } + + // if (( packageData.getName() != null ) && ( ! packageData.getName().equals("") )) { + // localName = packageData.getName(); + // localName = localName.replace(search, replace); + // localPackage.setName(localName); + // } + + // oldPackages.add(localPackage); + // } + // } + // } + + // // reverse order for uninstallation + // int number = oldPackages.size(); + // for (int i = 0; i < number; i++) { + // if ( i > 0 ) { + // PackageDescription oldPackageData = (PackageDescription) oldPackages.remove(i); + // oldPackages.add(0,oldPackageData); + // } + // } + + // installData.setOldPackages(oldPackages); + // } + static public void sortPackages(Vector allPackages, Vector sortedPackages, String mode) { for (int i = 0; i < allPackages.size(); i++) { boolean integrated = false; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/package/qa/storages/makefile.mk new/ooo310-m7-components/package/qa/storages/makefile.mk --- old/ooo310-m6-components/package/qa/storages/makefile.mk 2009-02-05 12:38:04.000000000 +0100 +++ new/ooo310-m7-components/package/qa/storages/makefile.mk 2009-03-19 23:25:35.000000000 +0100 @@ -63,6 +63,7 @@ Test14.java\ Test15.java\ Test16.java\ + Test17.java\ RegressionTest_114358.java\ RegressionTest_i29169.java\ RegressionTest_i30400.java\ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/package/qa/storages/StorageUnitTest.java new/ooo310-m7-components/package/qa/storages/StorageUnitTest.java --- old/ooo310-m6-components/package/qa/storages/StorageUnitTest.java 2009-02-05 12:38:04.000000000 +0100 +++ new/ooo310-m7-components/package/qa/storages/StorageUnitTest.java 2009-03-19 23:25:35.000000000 +0100 @@ -83,6 +83,7 @@ "ExecuteTest14", "ExecuteTest15", "ExecuteTest16", + "ExecuteTest17", "ExecuteRegressionTest_114358", "ExecuteRegressionTest_i29169", "ExecuteRegressionTest_i30400", @@ -227,6 +228,12 @@ assure( "Test16 failed!", aTest.test() ); } + public void ExecuteTest17() + { + StorageTest aTest = new Test17( m_xMSF, m_xStorageFactory, log ); + assure( "Test17 failed!", aTest.test() ); + } + public void ExecuteRegressionTest_114358() { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/package/qa/storages/Test17.java new/ooo310-m7-components/package/qa/storages/Test17.java --- old/ooo310-m6-components/package/qa/storages/Test17.java 1970-01-01 01:00:00.000000000 +0100 +++ new/ooo310-m7-components/package/qa/storages/Test17.java 2009-03-19 23:25:35.000000000 +0100 @@ -0,0 +1,142 @@ +package complex.storages; + +import com.sun.star.uno.XInterface; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XSingleServiceFactory; + +import com.sun.star.bridge.XUnoUrlResolver; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; +import com.sun.star.io.XStream; +import com.sun.star.io.XInputStream; + +import com.sun.star.embed.*; + +import share.LogWriter; +import complex.storages.TestHelper; +import complex.storages.StorageTest; + +public class Test17 implements StorageTest { + + XMultiServiceFactory m_xMSF; + XSingleServiceFactory m_xStorageFactory; + TestHelper m_aTestHelper; + + public Test17( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory, LogWriter aLogWriter ) + { + m_xMSF = xMSF; + m_xStorageFactory = xStorageFactory; + m_aTestHelper = new TestHelper( aLogWriter, "Test17: " ); + } + + public boolean test() + { + try + { + XStream xTempFileStream = m_aTestHelper.CreateTempFileStream( m_xMSF ); + if ( xTempFileStream == null ) + return false; + + // create storage based on the temporary stream + Object pArgs[] = new Object[2]; + pArgs[0] = (Object) xTempFileStream; + pArgs[1] = new Integer( ElementModes.WRITE ); + + Object oTempStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); + XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage ); + if ( xTempStorage == null ) + { + m_aTestHelper.Error( "Can't create temporary storage representation!" ); + return false; + } + + + byte pBytes1[] = { 1, 1, 1, 1, 1 }; + String pNames[] = { "SubStream1", "SubStream2", "SubStream3", "SubStream4", "SubStream5", "SubStream6", "SubStream7" }; + + for ( int nInd = 0; nInd < pNames.length; nInd++ ) + { + // open a new substorage + XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempStorage, + "SubStorage1", + ElementModes.WRITE ); + if ( xTempSubStorage == null ) + { + m_aTestHelper.Error( "Can't create substorage!" ); + return false; + } + + // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes + if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage, pNames[nInd], "MediaType1", true, pBytes1 ) ) + return false; + + // commit substorage first + if ( !m_aTestHelper.commitStorage( xTempSubStorage ) ) + return false; + + // dispose used storage to free resources + if ( !m_aTestHelper.disposeStorage( xTempSubStorage ) ) + return false; + } + + // commit the root storage so the contents must be stored now + if ( !m_aTestHelper.commitStorage( xTempStorage ) ) + return false; + + // dispose used storage to free resources + if ( !m_aTestHelper.disposeStorage( xTempStorage ) ) + return false; + + + // ================================================ + // now check all the written information + // ================================================ + + // close the output part of the temporary stream + // the output part must present since we already wrote to the stream + if ( !m_aTestHelper.closeOutput( xTempFileStream ) ) + return false; + + XInputStream xTempInStream = m_aTestHelper.getInputStream( xTempFileStream ); + if ( xTempInStream == null ) + return false; + + + // open input stream + // since no mode is provided the result storage must be opened readonly + Object pOneArg[] = new Object[1]; + pOneArg[0] = (Object) xTempInStream; + + Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pOneArg ); + XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage ); + if ( xResultStorage == null ) + { + m_aTestHelper.Error( "Can't open storage based on input stream!" ); + return false; + } + + // open existing substorage + XStorage xResultSubStorage = m_aTestHelper.openSubStorage( xResultStorage, + "SubStorage1", + ElementModes.READ ); + if ( xResultSubStorage == null ) + { + m_aTestHelper.Error( "Can't open existing substorage!" ); + return false; + } + + for ( int nInd = 0; nInd < pNames.length; nInd++ ) + if ( !m_aTestHelper.checkStream( xResultSubStorage, pNames[nInd], "MediaType1", true, pBytes1 ) ) + return false; + + return true; + } + catch( Exception e ) + { + m_aTestHelper.Error( "Exception: " + e ); + return false; + } + } + +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/package/source/xstor/owriteablestream.cxx new/ooo310-m7-components/package/source/xstor/owriteablestream.cxx --- old/ooo310-m6-components/package/source/xstor/owriteablestream.cxx 2009-01-06 14:16:56.000000000 +0100 +++ new/ooo310-m7-components/package/source/xstor/owriteablestream.cxx 2009-03-19 23:25:35.000000000 +0100 @@ -2249,52 +2249,57 @@ throw ( uno::RuntimeException ) { // should be an internal method since it can be called only from parent storage + { + ::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); - ::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); + if ( !m_pImpl ) + throw lang::DisposedException(); - if ( !m_pImpl ) - throw lang::DisposedException(); + if ( m_xOutStream.is() ) + CloseOutput_Impl(); - if ( m_xOutStream.is() ) - CloseOutput_Impl(); + if ( m_xInStream.is() ) + { + m_xInStream->closeInput(); + m_xInStream = uno::Reference< io::XInputStream >(); + } + + m_pImpl->m_pAntiImpl = NULL; + + if ( !m_bInitOnDemand ) + { + try + { + if ( !m_bTransacted ) + { + m_pImpl->Commit(); + } + else + { + // throw away all the changes + m_pImpl->Revert(); + } + } + catch( uno::Exception& ) + { + uno::Any aCaught( ::cppu::getCaughtException() ); + throw lang::WrappedTargetRuntimeException( + ::rtl::OUString::createFromAscii( "Can not commit/revert the storage!\n" ), + uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), + uno::UNO_QUERY ), + aCaught ); + } + } - if ( m_xInStream.is() ) - { - m_xInStream->closeInput(); - m_xInStream = uno::Reference< io::XInputStream >(); - } + m_pImpl = NULL; + } + + // the listener might try to get rid of parent storage, and the storage would delete this object; + // for now the listener is just notified at the end of the method to workaround the problem + // in future a more elegant way should be found lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); m_pData->m_aListenersContainer.disposeAndClear( aSource ); - - m_pImpl->m_pAntiImpl = NULL; - - if ( !m_bInitOnDemand ) - { - try - { - if ( !m_bTransacted ) - { - m_pImpl->Commit(); - } - else - { - // throw away all the changes - m_pImpl->Revert(); - } - } - catch( uno::Exception& ) - { - uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( "Can not commit/revert the storage!\n" ), - uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), - uno::UNO_QUERY ), - aCaught ); - } - } - - m_pImpl = NULL; } //----------------------------------------------- diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ooo310-m6-components/package/source/zippackage/ZipPackageFolder.cxx new/ooo310-m7-components/package/source/zippackage/ZipPackageFolder.cxx --- old/ooo310-m6-components/package/source/zippackage/ZipPackageFolder.cxx 2008-05-14 12:33:53.000000000 +0200 +++ new/ooo310-m7-components/package/source/zippackage/ZipPackageFolder.cxx 2009-03-19 23:25:35.000000000 +0100 @@ -271,7 +271,7 @@ // it is an empty subfolder, use workaround to store it ZipEntry* pTempEntry = new ZipEntry(); ZipPackageFolder::copyZipEntry ( *pTempEntry, aEntry ); - pTempEntry->nNameLen = (sal_Int16)rPath.getLength(); + pTempEntry->nNameLen = (sal_Int16)( ::rtl::OUStringToOString( rPath, RTL_TEXTENCODING_UTF8 ).getLength() ); pTempEntry->nExtraLen = -1; pTempEntry->sName = rPath; @@ -333,7 +333,7 @@ ZipPackageFolder::copyZipEntry ( *pTempEntry, pStream->aEntry ); pTempEntry->sName = rPath + rShortName; - pTempEntry->nNameLen = (sal_Int16)( pTempEntry->sName.getLength() ); + pTempEntry->nNameLen = (sal_Int16)( ::rtl::OUStringToOString( pTempEntry->sName, RTL_TEXTENCODING_UTF8 ).getLength() ); sal_Bool bToBeEncrypted = pStream->IsToBeEncrypted() && (bHaveEncryptionKey || pStream->HasOwnKey()); sal_Bool bToBeCompressed = bToBeEncrypted ? sal_True : pStream->IsToBeCompressed(); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org