diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-03-27 16:41:48 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-03-27 17:39:05 +0100 |
commit | 319407dba6f6bb0343865d010bfd436900ad0f2f (patch) | |
tree | ae7ca31a216adc4d6fd7df7e44e850f378d9c53f /desktop/source/deployment/manager | |
parent | 65284c03757f70478f04aedd4ed7f4062a7c5516 (diff) |
tdf#131084 Revert "Drop checking for user extensions w/ the same ID on every synchronization"
This reverts commit 675295d7e18c1505835893e51a853a5b4ce37ed6.
Beyond the user-installed extension problem in tdf#131084 this also
breaks bundled dictionaries in instdir/share/extensions, which aren't
loaded any more. This is masked by fall-back code that loads dicts from
/usr/share on Linux so more noticeable on Windows.
Maybe it would be possible to do this only once on user profile creation
but i don't know much about extension stuff...
Rene points out that Debian packages can install bundled extensions
after the user-profile is created so that wouldn't work either.
Change-Id: I9f0071c2441a4cf967f8981ef3a3e064197b88aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91226
Tested-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'desktop/source/deployment/manager')
-rw-r--r-- | desktop/source/deployment/manager/dp_extensionmanager.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 558ebe02fdfd..708c40215fa5 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -1224,6 +1224,33 @@ sal_Bool ExtensionManager::synchronize( bModified |= static_cast<bool>(getBundledRepository()->synchronize(xAbortChannel, xCmdEnv)); progressBundled.update("\n\n"); + //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<css::deployment::XPackage> > > + seqSeqExt = getAllExtensions(xAbortChannel, xCmdEnv); + for (sal_Int32 i = 0; i < seqSeqExt.getLength(); i++) + { + uno::Sequence<Reference<css::deployment::XPackage> > const & seqExt = + seqSeqExt[i]; + activateExtension(seqExt, isUserDisabled(seqExt), true, + xAbortChannel, xCmdEnv); + } + } + catch (...) + { + //We catch the exception, so we can write the lastmodified file + //so we will no repeat this every time OOo starts. + OSL_FAIL("Extensions Manager: synchronize"); + } OUString lastSyncBundled("$BUNDLED_EXTENSIONS_USER/lastsynchronized"); writeLastModified(lastSyncBundled, xCmdEnv, m_xContext); OUString lastSyncShared("$SHARED_EXTENSIONS_USER/lastsynchronized"); |