Hi all,
I'm working on the CR 7109218, which is related to text/texinfo
packaging and I'd like to know your opinion about the solution I found.
The package delivers (besides other files):
1) service manifest (svc:/application/texinfo-update:default)
2) service start method script (/lib/svc/method/svc-texinfo-update)
2) some doc files (going to /usr/share/info)
The service manifest file gets the
restart_fmri=svc:/system/manifest-import:default tag.
The doc files gets the restart_fmri=svc:/application/texinfo-update:default tag.
When the package is removed from the system (pkg uninstall text/texinfo),
the service texinfo-update (delivered by this package) gets restarted because of
restart_fmri tag used for doc files. But at that time the service start method
script (/lib/svc/method/svc-texinfo-update) is already deleted, leading to the
service
going into maintenance and errors written to log.
[ Nov 8 14:54:08 Stopping because service restarting. ]
[ Nov 8 14:54:08 Executing stop method (null). ]
[ Nov 8 14:54:08 Executing start method ("/lib/svc/method/svc-texinfo-update
start"). ]
/usr/sbin/sh[1]: exec: /lib/svc/method/svc-texinfo-update: not found
[ Nov 8 14:54:08 Method "start" exited with status 127. ]
[ Nov 8 14:54:08 Executing start method ("/lib/svc/method/svc-texinfo-update
start"). ]
/usr/sbin/sh[1]: exec: /lib/svc/method/svc-texinfo-update: not found
[ Nov 8 14:54:08 Method "start" exited with status 127. ]
[ Nov 8 14:54:08 Executing start method ("/lib/svc/method/svc-texinfo-update
start"). ]
/usr/sbin/sh[1]: exec: /lib/svc/method/svc-texinfo-update: not found
[ Nov 8 14:54:08 Method "start" exited with status 127. ]
I found there is an disable_fmri tag, which can be used to disable given
service prior
to action removal. I verified it works - when I add this tag to the start
method script
(diff attached), then this error doesn't happen.
But I'm not sure if it is a proper solution, as I didn't find the disable_fmri
tag to be
used by any other package (searched ON and Userland gates). Your opinion is
appreciated!
Thank you
Petr
pcvachou@sfwcfi:/builds/pcvachou/7109218/components/texinfo$ hg pdiffs
diff -r 085a881269b8 components/texinfo/texinfo.p5m
--- a/components/texinfo/texinfo.p5m Fri Nov 11 05:39:11 2011 -0800
+++ b/components/texinfo/texinfo.p5m Mon Nov 14 07:43:40 2011 -0800
@@ -89,7 +89,7 @@
dir path=var
dir path=var/info
file texinfo-update.xml path=lib/svc/manifest/application/texinfo-update.xml
-file svc-texinfo-update path=lib/svc/method/svc-texinfo-update
+file svc-texinfo-update path=lib/svc/method/svc-texinfo-update
disable_fmri=svc:/application/texinfo-update:default
file path=usr/bin/info
file path=usr/bin/infokey
file path=usr/bin/install-info
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss