diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-08-10 15:52:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-10 16:03:28 +0200 |
commit | 6dcb3d4ef46312729bb6f16c473b433474863f68 (patch) | |
tree | 58f2f577d9883e32b886bbe4086f83d0bb16fc81 /desktop/source/deployment/manager/dp_extensionmanager.cxx | |
parent | f2f3703740f65b76e891ecc3591d7e60d5b7caef (diff) |
Related fdo#51252: No more prereg, no more unopkg sync
Now that 5c47e5f63a79a9e72ec4a100786b1bbf65137ed4 "fdo#51252 Disable copying
share/prereg/bundled to avoid startup crashes" removed the use of share/prereg,
there is no longer need to generate it in the first place (by calling "unopkg
sync" at build or installation time), and so no need for the "unopkg sync" sub-
command, either. This also allows to simplify some of the jvmfwk code that was
only there so that "unopkg sync" (which can require a JVM) can work in "hostile"
environments (during build and installation).
Change-Id: I52657384f4561bf27948ba4f0f88f4498e90987f
Diffstat (limited to 'desktop/source/deployment/manager/dp_extensionmanager.cxx')
-rw-r--r-- | desktop/source/deployment/manager/dp_extensionmanager.cxx | 75 |
1 files changed, 9 insertions, 66 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index f2a6fce0a0ff..68403f1af6cb 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -1258,64 +1258,6 @@ void ExtensionManager::reinstallDeployedExtensions( } } -/** Works on the bundled repository. That is using the variables - BUNDLED_EXTENSIONS and BUNDLED_EXTENSIONS_USER. - */ -void ExtensionManager::synchronizeBundledPrereg( - Reference<task::XAbortChannel> const & xAbortChannel, - Reference<ucb::XCommandEnvironment> const & xCmdEnv ) - throw (deploy::DeploymentException, - uno::RuntimeException) -{ - try - { - String sSynchronizingBundled(StrSyncRepository::get()); - sSynchronizingBundled.SearchAndReplaceAllAscii( "%NAME", OUSTR("bundled")); - dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled); - - Reference<deploy::XPackageManagerFactory> xPackageManagerFactory( - deploy::thePackageManagerFactory::get(m_xContext)); - - Reference<deploy::XPackageManager> xMgr = - xPackageManagerFactory->getPackageManager(OUSTR("bundled_prereg")); - xMgr->synchronize(xAbortChannel, xCmdEnv); - progressBundled.update(OUSTR("\n\n")); - - uno::Sequence<Reference<deploy::XPackage> > extensions = xMgr->getDeployedPackages( - xAbortChannel, xCmdEnv); - try - { - for (sal_Int32 i = 0; i < extensions.getLength(); i++) - { - extensions[i]->registerPackage(true, xAbortChannel, xCmdEnv); - } - } - catch (...) - { - OSL_ASSERT(0); - } - OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM( - "$BUNDLED_EXTENSIONS_PREREG/lastsynchronized")); - writeLastModified(lastSyncBundled, xCmdEnv); - - } catch ( const deploy::DeploymentException& ) { - throw; - } catch ( const ucb::CommandFailedException & ) { - throw; - } catch ( const ucb::CommandAbortedException & ) { - throw; - } catch (const lang::IllegalArgumentException &) { - throw; - } catch (const uno::RuntimeException &) { - throw; - } catch (...) { - uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( - OUSTR("Extension Manager: exception in synchronize"), - static_cast<OWeakObject*>(this), exc); - } -} - sal_Bool ExtensionManager::synchronize( Reference<task::XAbortChannel> const & xAbortChannel, Reference<ucb::XCommandEnvironment> const & xCmdEnv ) @@ -1342,14 +1284,15 @@ sal_Bool ExtensionManager::synchronize( bModified |= getBundledRepository()->synchronize(xAbortChannel, xCmdEnv); progressBundled.update(OUSTR("\n\n")); - //Always determine the active extension. This is necessary for the - //first-start optimization. The setup creates the registration data for the - //bundled extensions (brand_layer/share/prereg/bundled), which is copied to the user - //installation (user_installation/extension/bundled) when a user starts OOo - //for the first time after running setup. All bundled extensions are registered - //at that moment. However, extensions with the same identifier can be in the - //shared or user repository, in which case the respective bundled extensions must - //be revoked. + //Always determine the active extension. + //TODO: Is this still necessary? (It used to be necessary for the + // first-start optimization: The setup created the registration data + // for the bundled extensions (share/prereg/bundled) which was copied to + // the user installation when a user started OOo for the first time + // after running setup. All bundled extensions were registered at that + // moment. However, extensions with the same identifier could be in the + // shared or user repository, in which case the respective bundled + // extensions had to be revoked.) try { const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > > |