Troubleshooting Solaris package removal

A co-worker was having trouble running

# pkgrm SUNWfontconfig-root

It was returning:

## Removing pathnames in class <manifest>
svc:/application/font/fc-cache:default remains enabled; aborting
pkgrm: ERROR: class action script did not complete successfully

Removal of <SUNWfontconfig-root> failed.

To troubleshoot it, we added the -v option to pkgrm so it would show the scripts it was running:

# pkgrm -v SUNWfontconfig-root
+ [  !=  -a  != / ]
+ [ -r /etc/svc/volatile/repository_door ]
smf_alive=yes
SVCPROP=/usr/bin/svcprop
+ read mfst
+ [ yes = yes ]
+ /usr/sbin/svccfg inventory /var/svc/manifest/application/font/fc-cache.xml
ENTITIES=svc:/application/font/fc-cache:default
svc:/application/font/fc-cache
+ /usr/bin/svcprop -p general/enabled svc:/application/font/fc-cache:default
en_p=true
+ /usr/bin/svcprop -p general_ovr/enabled svc:/application/font/fc-cache:default
en_o=
+ [ true = true -o  = true ]
+ echo svc:/application/font/fc-cache:default remains enabled; aborting
svc:/application/font/fc-cache:default remains enabled; aborting
+ exit 1
pkgrm: ERROR: class action script did not complete successfully

Ok, now we can see the problem.  We need to change the general/enabled property of the service to false and refresh the service.

# svccfg -s   svc:/application/font/fc-cache:default setprop general/enabled = false

# svcadm refresh font/fc-cache:default

Verify that it took:

# /usr/bin/svcprop -p general/enabled svc:/application/font/fc-cache:default

false

That looks good.  Now we can retry the package removal:

# pkgrm SUNWfontconfig-root

and it worked!




								
				

			

Leave a Reply


Copyright © 2010 williamhathaway.com. All Rights Reserved.
No computers were harmed in the 0.325 seconds it took to produce this page.

Designed/Developed by Lloyd Armbrust & hot, fresh, coffee.