Issue 118726 - extensions.pmap is not recreated after deleting user directory
Summary: extensions.pmap is not recreated after deleting user directory
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC All
: P3 Major (vote)
Target Milestone: ---
Assignee: ab
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-01-05 06:17 UTC by Oliver Brinzing
Modified: 2012-01-13 08:24 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
oliver.brinzing: 3.4_release_blocker?


Attachments
extensions.pmap_before_start (497 bytes, application/octet-stream)
2012-01-11 06:22 UTC, Oliver Brinzing
no flags Details
extensions.pmap (114 bytes, application/octet-stream)
2012-01-11 06:23 UTC, Oliver Brinzing
no flags Details
extension-manager.gif (9.95 KB, image/gif)
2012-01-11 06:23 UTC, Oliver Brinzing
no flags Details
Patch to test bundled extensions (13.65 KB, patch)
2012-01-11 15:50 UTC, Ariel Constenla-Haile
no flags Details | Diff
extensions.pmap from openoffice.org3/share/prereg/bundled/ (204 bytes, text/plain)
2012-01-11 15:55 UTC, Ariel Constenla-Haile
no flags Details
extensions.pmap in the user directory (114 bytes, text/plain)
2012-01-11 15:56 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2012-01-05 06:17:06 UTC
i found this bug in win32 aoo3.4 dev build revision 1226179

steps to reproduce:

- add some shared extensions (java, c++, basic)
- close oo and delete the user directory, e.g.: 
  C:\Users\User\AppData\Roaming\OpenOffice.org\3.4\user
- restart oo 
- extensions will be initialized and user directory will be 
  created on first start.
- but "Tools - Extension Manager" is empty now
  extensions are working, except for basic library extensions:
  "Tools - Macros - Organize Macros - OOo-dev Basic... - OOo-dev Macros"
  does not show the macros deployed via extension.

  the missing file is:
  C:\Users\User\AppData\Roaming\OpenOffice.org\3.4\user\extensions\
  shared\extensions.pmap

it worked with oo3.4beta1 (oracle) -> regression

comment from arielch:
The change made is the removal of the Berkely Database, so now 
instead of extensions.db you have a extensions.pmap file 
(a plain text file).
Comment 1 Oliver Brinzing 2012-01-05 06:18:05 UTC
added keyword "regression"
Comment 2 Raphael Bircher 2012-01-07 08:42:27 UTC
rbircher > hdu do you working on this? If yes please set the issue to started.
Comment 3 Oliver Brinzing 2012-01-11 06:22:59 UTC
Created attachment 77117 [details]
extensions.pmap_before_start
Comment 4 Oliver Brinzing 2012-01-11 06:23:22 UTC
Created attachment 77118 [details]
extensions.pmap
Comment 5 Oliver Brinzing 2012-01-11 06:23:45 UTC
Created attachment 77119 [details]
extension-manager.gif
Comment 6 Oliver Brinzing 2012-01-11 06:32:12 UTC
with aoo3.4m1 revision 1229372 situation is really worse now:


i installed 4 extensions from command line:
unopkg add oracle-*.oxt --shared --verbose

attached "extensions.pmap_before_start" shows the result.
seems to be ok.

but after starting aoo, "Tools - Extension Manager..." will
show only the first installed extension.
and the "extension.pmap" lost all entries except for the
first installed extension (revision 1226179 did not change#
the *.pmap file)

see attached *.gif and *.pmap file for details
Comment 7 Ariel Constenla-Haile 2012-01-11 08:40:50 UTC
I can confirm this with revision 1229372
There is no need to remove the user directory.

On a new installation, with no user directory, do the following:

1. start AOO
2. Use the Extension Manager GUI (Tools menu) to install the following extensions FOR ALL USERS, in the following order:

2.1. Wiki Publisher
2.2. Presentation Minimizer
2.3. Presenter Consoler

3. Restart AOO
4. Open the Extension Manager GUI from the Tools menu

Result: only the last installed extension is listed, the Presenter Consoler

Set status to new.
Comment 8 Ariel Constenla-Haile 2012-01-11 15:50:55 UTC
Created attachment 77123 [details]
Patch to test bundled extensions

The attached patch will ad two bundled extensions:

* writer2epub.oxt
* numbertext

See trunk/main/myextensions/README

After the first application run, the Extension Manager only shows the numbertext extension.
This used to work before, see http://s.apache.org/5LG
Comment 9 Ariel Constenla-Haile 2012-01-11 15:55:02 UTC
Created attachment 77124 [details]
extensions.pmap from openoffice.org3/share/prereg/bundled/
Comment 10 Ariel Constenla-Haile 2012-01-11 15:56:19 UTC
Created attachment 77125 [details]
extensions.pmap in the user directory
Comment 11 hdu@apache.org 2012-01-12 10:46:24 UTC
FWIW regarding the test case in comment 8 during installation of writer2epub.oxt an exception is thrown on my system
("python-loader:<type 'exceptions.ImportError'>: No module named pythonloader, traceback follows no traceback available")
and handled in dp_backend.cxx:684 and upwards.
Comment 12 hdu@apache.org 2012-01-12 15:13:59 UTC
(In reply to comment #11)
> FWIW regarding the test case in comment 8 during installation of
> writer2epub.oxt an exception is thrown on my system
> ("python-loader:<type 'exceptions.ImportError'>: No module named pythonloader,
> traceback follows no traceback available")
> and handled in dp_backend.cxx:684 and upwards.

Minor update: This python problem is already being tracked in issue 118021.
Comment 13 hdu@apache.org 2012-01-12 16:19:00 UTC
Mea culpa: since on some platforms the destructors of the PersistentMap were not called by the extremely complex extmanager factory cleanup process the easiest fix was to flush updated maps early. When doing the inital read the flush is not helpful and resulted in the problem reported. Fixed in revision 1230614. Please check.
Comment 14 Ariel Constenla-Haile 2012-01-13 01:37:43 UTC
Verified.

Tested with:
* bundled extensions
* shared extensions
* user extensions

Removing the user directory, bundled and share extensions are present in the newly created profile.
Comment 15 hdu@apache.org 2012-01-13 08:24:11 UTC
Thanks for verifying.
Comment 16 hdu@apache.org 2012-01-13 08:24:56 UTC
Closing resolved and verified issue.