Hi all,

I came across the following problem. I create a a package containing 
OpenOffice.org (OOo) and some dictionaries. The dictionaris are 
OpenOffice.org extensions (file extension is .oxt) which need to be 
installed using a tool named unopkg (not related to pkg) which is part 
of OOo. This is done with running a postinstall script on Linux/Solaris. 
Since there are no such scripts with IPS I thought of the following 
solution. There is an SMF service which is installed with OOo and which 
takes care of invoking unopkg to install the extensions. This service is 
also responsible for uninstalling the extensions as part of the 
uninstallation procedure of OOo. The dictionary extensions are also part 
of the OOo package and are to be installed after the installation of the 
service. Each dictionary file triggers the service by using  "restart_fmri"
The service and dictionary are uploaded using these commands:

pkgsend -s http://localhost:9000 add file svc-ooo_bundled_extensions 
mode=644owner=root group=bin path=/lib/svc/method/svc-ooo_bundled_extensions
pkgsend -s http://localhost:9000 add file ooo_bundled_extensions.xml 
mode=644 owner=root group=bin 
path=/var/svc/manifest/application/ooo_bundled_extensions.xml 
restart_fmri=svc:/system/manifest-import:default
pkgsend -s http://localhost:9000 add file dict-af.oxt  mode=644 
owner=root group=bin 
path=/opt/openoffice.org3/share/extension/install/dict-af.oxt 
restart_fmri=svc:/application/ooo_bundled_extensions:default


When there is no restart_fmri "attached" to dict-af.oxt then the 
ooo_bundled_extension service is correctly installed. But when using the 
restart_fmri with dict-af.oxt then the service is not registered 
although the manifest and method script are correctly installed. 
Therefore the invcation of the service after installing the dictionary 
fails.

I also noted that the installation of the service is not synchronous. 
The server uses
 <create_default_instance enabled="true" />
therefore the service goes online right after installation and runs its 
start method. The installer, however, does not wait until this method 
returns. I noticed this when I installed the dictionary without 
restart_fmri and the dictionary was still registered (e.g. unopkg was 
run by the service). That was not expected because the service was 
installed first and the dictionary did not trigger the service.

So my questions are:

Do you agree that the scenario where the service is not registered is a bug?

Is there a way so that the installation of a service occurs synchronously?

Assuming there are several dictionaries, where each file triggers the 
service, would this happen synchronously? That is, only if the start 
method returned then the service is again restarted on behalve of the 
next dictionary.

Thanks,

Joachim

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to