Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/1998 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/98/1998/1 Cleanly remove an extension again that cannot be activated while installing it ...otherwise, it will needlessly be carried forward marked "broken." Change-Id: I12fbd4430e1ecc11f1969ae5f49aed43668f2c27 (cherry picked from commit 3c71fa1e5ee6cd83f713c65a372006bc3aef0953) --- M desktop/source/deployment/manager/dp_extensionmanager.cxx 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 3213c1a..5c9280d 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -694,6 +694,10 @@ xOldExtension ); { + bool added = false; + OUString sNewExtensionIdentifier; + OUString sNewExtensionFileName; + // In this garded section (getMutex) we must not use the argument xCmdEnv // because it may bring up dialogs (XInteractionHandler::handle) this //may potententially deadlock. See issue @@ -738,6 +742,7 @@ xNewExtension = xPackageManager->addPackage( url, properties, OUString(), xAbortChannel, Reference<ucb::XCommandEnvironment>()); + added = true; //If we add a user extension and there is already one which was //disabled by a user, then the newly installed one is enabled. If we //add to another repository then the user extension remains @@ -746,9 +751,8 @@ if (repository.equals(OUSTR("user"))) bUserDisabled2 = false; - // pass the two values via variables to workaround gcc-4.3.4 specific bug (bnc#655912) - OUString sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension); - OUString sNewExtensionFileName = xNewExtension->getName(); + sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension); + sNewExtensionFileName = xNewExtension->getName(); activateExtension( sNewExtensionIdentifier, sNewExtensionFileName, @@ -793,6 +797,18 @@ //If the user aborted installation then a ucb::CommandAbortedException //is thrown. //Use a private AbortChannel so the user cannot interrupt. + if (added) { + try { + xPackageManager->removePackage( + sNewExtensionIdentifier, sNewExtensionFileName, + css::uno::Reference< css::task::XAbortChannel >(), + css::uno::Reference< css::ucb::XCommandEnvironment >()); + } catch (css::uno::Exception & e) { + SAL_WARN( + "desktop.deployment", + "ignoring Exception " << e.Message); + } + } try { if (xExtensionBackup.is()) -- To view, visit https://gerrit.libreoffice.org/1998 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12fbd4430e1ecc11f1969ae5f49aed43668f2c27 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: libreoffice-4-0 Gerrit-Owner: Stephan Bergmann <sberg...@redhat.com> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice