1prodreg(1M) System Administration Commands prodreg(1M)
2
3
4
6 prodreg - Solaris Product Registry administration
7
9 prodreg [--help] | [subcommand operand ...]
10
11
13 The prodreg utility browses, unregisters, and uninstalls components in
14 the Solaris Product Registry.
15
16
17 Some installers make use of the libwsreg(3LIB) interface to register
18 information. The Solaris Product Registry contains information about
19 this installed software.
20
21
22 The database associated with the Solaris Product Registry is relative
23 to the root of the installed file system. Normally, this is the root of
24 the file system (/). Sometimes, an alternate root, with a different
25 Solaris Product Registry install database is used, as during live
26 upgrade installation. See live_upgrade(5).
27
28
29 The Registry database informs installers about installed software. The
30 Registry and the prodreg utility do not directly perform installation
31 or deinstallation. prodreg supports installers which are executed
32 externally and launched by the prodreg utility or other means.
33
34
35 Depending on the subcommand, the prodreg command offers equivalent
36 functions from the command line or a GUI viewer. Two versions of the
37 GUI viewer are available. The default is the Java Swing GUI. The other
38 version, the Java awt GUI is provided for environments without Java
39 Swing support.
40
41
42 The only feature which exists in the CLI which is not present in the
43 GUI is the unregister subcommand. It is possible for the product reg‐
44 istry to become corrupted, if for example, some software is removed
45 manually instead of by means of an uninstaller program. These entries
46 can confuse installers which are run subsequently. The unregister sub‐
47 command allows stale entries to be removed, even forcefully. Care
48 should be exercised when unregistering software with the recursive or
49 force options so that valid entries in the registry are not removed by
50 mistake.
51
52
53 The prodreg command, whether it launches the GUI or the command line
54 interface browser, displays the contents of the registry at that time
55 only. If software is installed or uninstalled subsequent to or concur‐
56 rent with launching either prodreg viewer, the view can be inconsistent
57 with the Solaris Product Registry.
58
60 You can specify options to the prodreg command without specifying a
61 subcommand. If the subcommand is omitted, the swing subcommand is
62 assumed.
63
64
65 The following subcommands are supported:
66
67 awt Launch the Java awt GUI.
68
69 The awt subcommand has the following for‐
70 mat:
71
72 awt [-R alt_root | --help]
73
74
75
76
77 browse Display the Solaris Product Registry using
78 a command line interface. The text output
79 of this command displays identifying infor‐
80 mation of any component in the product reg‐
81 istry tree, including its ancestors and
82 children. If you repeatedly invoke this
83 subcommand, you can interactively browse
84 the product registry.
85
86 The database components are related as a
87 tree. Components may have one or more chil‐
88 dren. Except for the root, components have
89 one parent. This subcommand displays the
90 ancestors and children for a given compo‐
91 nent in the Solaris Product Registry data‐
92 base.
93
94 Each time the prodreg browse subcommand is
95 executed, one component in the Registry is
96 shown, along with its ancestry to the root
97 of the Registry, as well as the component's
98 children. To browse in the prodreg GUI, a
99 user selects a node to expand and clicks on
100 it. The analogous activity using the com‐
101 mand line interface is to browse on chil‐
102 dren of nodes successively, which effec‐
103 tively expands a view into the registry.
104
105 Start by browsing the root of the Registry
106 with prodreg browse. Select components to
107 expand the scope of the browsing activity.
108 Use browse numbers as a convenience during
109 this interactive browsing, but not in
110 scripts. Browse numbers can change from one
111 session to the next or on different sys‐
112 tems. This is because browse numbers are
113 generated as they are first used, by a
114 given user on a particular system.
115
116 The browse subcommand has the following
117 format:
118
119 browse [-R alt_root] [-u uuid [-i instance | -p location]]
120 browse [-R alt_root] -n bnum [-i instance | -p location]
121 browse [-R alt_root] -m name
122 browse --help
123
124
125 This following information is output for
126 each component:
127
128 BROWSE # This is the browse number asso‐
129 ciated with each component.
130 This number can be used as an
131 argument to either the prodreg
132 browse or info subcommands as a
133 convenience
134
135
136 +/-/. The + indicates a component in
137 the tree with children who are
138 not shown. - indicates a compo‐
139 nent with children of which at
140 least one child is being shown.
141 The . indicates a component
142 which has no children. This
143 field is arranged so that each
144 space (reading left to right)
145 depicts a successive genera‐
146 tion.
147
148
149 UUID This is the component's unique
150 identifier.
151
152
153 # This is the instance number of
154 the component. Software compo‐
155 nents can be installed multiple
156 times. The software registry
157 assigns a unique instance to
158 each one.
159
160
161 NAME Each component in the Solaris
162 Product Registry database has a
163 localized name which is dis‐
164 played in this field. It is
165 possible that this name may not
166 be unique in the registry since
167 there could be another compo‐
168 nent that has the same name.
169
170 The browse subcommand provides four dis‐
171 tinct options for viewing the registry
172 database. If multiple instances are associ‐
173 ated with the same component, then the out‐
174 put of the subcommand is the ambiguous
175 list. The request must be made unambiguous.
176 The instance or location operands can be
177 used to disambiguate the browse subcommand
178 when used with the -u or -n options.
179
180 o If no operand information is
181 given, the root of the registry
182 tree is displayed, as well as
183 its children. This is the start‐
184 ing point for interactive brows‐
185 ing of the entire registry data‐
186 base.
187
188 o If the browse number is given,
189 the component associated is out‐
190 put.
191
192 o If the uuid is given, the compo‐
193 nent associated with it is out‐
194 put.
195
196 o If the name is given, the compo‐
197 nent associated with it is out‐
198 put.
199
200
201 info Display attributes for any component in the
202 Solaris Product Registry by supplying iden‐
203 tifying information for the component.
204
205 Components in the product registry are
206 associated with attributes. These
207 attributes are composed of a name and a
208 single value string.
209
210 This subcommand outputs attribute informa‐
211 tion associated with components in the
212 Solaris Product Registry. Individual compo‐
213 nents in the product registry are specified
214 as for the browse subcommand, except that
215 either the uuid, name or bnum must be spec‐
216 ified.
217
218 If a component requested is ambiguous as it
219 has more than one instance or the name is
220 assigned to more than one component in the
221 registry, the list of possibilities is out‐
222 put, not the attribute information.
223
224 The default output of this subcommand is a
225 complete list of each attributes, each on a
226 new line. The attribute name is followed by
227 a colon (:) and a SPACE. The attribute
228 value follows, after which a RETURN is
229 appended. Other options include can be
230 specified using -a and -d.
231
232 The info subcommand has the following for‐
233 mat:
234
235 info --help
236 info [-R alt_root] -u uuid [-i instance | -p location]
237 info [-R alt_root] -n bnum [-i instance | -p location]
238 info [-R alt_root] -m name [-a attr | -d ]
239
240
241
242
243 help | --help | -? Display help text.
244
245 The help subcommand has the following for‐
246 mat:
247
248 help | --help | -?
249
250
251
252
253 swing Launch the Java Swing GUI. If the Java
254 Swing GUI is not available, this subcommand
255 fails.
256
257 The swing subcommand has the following for‐
258 mat:
259
260 swing [-R alt_root | --help]
261
262
263
264
265 version | --version | -V Outputs a current version string.
266
267 The version subcommand has the following
268 format:
269
270 version | --version | -V
271
272
273
274
275 unregister Unregister an entry in the registry.
276
277 Remove a component from the Solaris Product
278 Registry. The component corresponding to
279 the uuid specified with the -u option must
280 be a single instance. If it is not, the
281 subcommand fails and returns the list of
282 instances with the associated uuid. The
283 subcommand must be reissued using either -p
284 or -i to uniquely determine which component
285 instance to unregister.
286
287 The unregister subcommand fails if there
288 are components in the registry which depend
289 on the component which is to be unregis‐
290 tered.
291
292 The unregister subcommand fails if the user
293 does not have write access to the registry.
294 See wsreg_can_access_registry(3WSREG). The
295 unregister subcommand fails if the user
296 attempts to unregister a system component,
297 instead of a component registered with the
298 Solaris Product Registry. System components
299 include those which include the attribute
300 PKG and certain special Registry nodes
301 including the following:
302
303 UUID Name
304 ==================================== =============================
305 root System Registry
306 a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b Solaris System Software
307 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b Unclassified Software
308 b96ae9a9-1dd1-11b2-a3f2-0800209a5b6b System Software Localizations
309 b1c43601-1dd1-11b2-a3f2-0800209a5b6b Additional System Software
310 a8dcab4f-1dd1-11b2-a3f2-0800209a5b6b Software Localizations
311
312
313 Before the unregister subcommand with the
314 -f option is used, you should carefully
315 review what components depend upon the com‐
316 ponent which is to be unregistered. The -r
317 option is even more dangerous, since all
318 children and software components depending
319 upon the component are also deregistered.
320 You can obtain the list of dependent compo‐
321 nents for a component with UUID uuid using
322 :
323
324 prodreg info -u uuid -a "Dependent Components"
325
326
327 You can obtain a list of required compo‐
328 nents using:
329
330 prodreg info -u <uuid> -a "Required Components"
331
332
333 The output lists the name, UUID and
334 instance of the component.
335
336 The unregister subcommand has the following
337 format:
338
339 unregister [-R alt_root] [-fr] -u uuid [-p location | -i instance]
340 unregister --help
341
342
343
344
345 uninstall Launch an uninstaller program.
346
347 Each component in the registry can have an
348 uninstaller associated with it. This sub‐
349 command executes this associated installer,
350 if there is one, for a component in the
351 registry given by the -u option. If there
352 is no uninstaller associated with the com‐
353 ponent, the subcommand fails. If the compo‐
354 nent given by the -u option is not unique
355 (as there is more than one instance of the
356 component installed), the subcommand out‐
357 puts a list of all instances. The subcom‐
358 mand must then be reissued using -i or -p
359 to disambiguate the uuid given with the -u
360 option. Finally, if the component to unin‐
361 stall is depended upon by other components,
362 the command fails.
363
364 The command may also launch an uninstaller
365 with a -x option. No checks for whether
366 this uninstalls a component upon which
367 other components depend in this case.
368
369 The uninstall command is not executed if
370 the user does not have write access to the
371 registry. See wsreg_can_access_reg‐
372 istry(3WSREG).
373
374 The uninstall command has the following
375 format:
376
377 uninstall [-R alt_root] [-f] -u uuid -p location
378 uninstall [-R alt_root] -i instance[arguments ...]
379 uninstall --help
380
381
382
383
385 The awt subcommand supports the following options:
386
387 --help Display help text, do not launch the viewer.
388
389
390 -R alt_root Use the specified alternate root to locate the database
391 to display with the GUI viewer.
392
393 See OPERANDS for information regarding specification of
394 alt_root.
395
396 Note -
397
398 The root file system of any non-global zones must not
399 be referenced with the -R option. Doing so might dam‐
400 age the global zone's file system, might compromise
401 the security of the global zone, and might damage the
402 non-global zone's file system. See zones(5).
403
404
405
406 The browse subcommand supports the following options:
407
408 -help Display help text, do not execute the browse subcommand.
409
410
411 -i instance Output the specified component instance.
412
413
414 -m name Output the component instances associated with the name.
415
416
417 -n bnum Output the component instances associated with the
418 browse number.
419
420
421 -p location Output the component instance installed in the specified
422 location. The install location for a component can be
423 obtained using the 'info' subcommand.
424
425
426 -R alt_root Use the specified alternate root to locate the database.
427
428 Note -
429
430 The root file system of any non-global zones must not
431 be referenced with the -R option. Doing so might dam‐
432 age the global zone's file system, might compromise
433 the security of the global zone, and might damage the
434 non-global zone's file system. See zones(5).
435
436
437 -u uuid Output the component instances associated with the uuid.
438
439
440
441 The info subcommand supports the following options:
442
443 -a attr Output only the attribute whose name is given by the op‐
444 erand 'attr', instead of all attributes of the specified
445 component.
446
447
448 -d Output only the attribute whose name is isDamaged,
449 instead of all attributes of the specified component. If
450 the value is set to true, this attribute indicates that
451 the component in the registry
452
453
454 --help Output help text, do not execute the browse subcommand.
455
456
457 -i instance The instance operand distinguishes among multiple
458 instances of components with the same uuid or browse
459 number.
460
461
462 -m name The name operand indicates one or more components in the
463 registry.
464
465
466 -n bnum Output the attributes of the component instance associ‐
467 ated with the browse number bnum. If there is more than
468 one instance, the command must be disambiguated using
469 the -ior -p options.
470
471
472 -p location The install location indicated distinguishes among mul‐
473 tiple instances of components with the same uuid or
474 browse number.
475
476
477 -R alt_root Use the specified alternate root to locate the database.
478
479 Note -
480
481 The root file system of any non-global zones must not
482 be referenced with the -R option. Doing so might dam‐
483 age the global zone's file system, might compromise
484 the security of the global zone, and might damage the
485 non-global zone's file system. See zones(5).
486
487
488 -u uuid Output the attributes of the component instance associ‐
489 ated with the uuid. If there is more than one instance,
490 the subcommand must be disambiguated using the -i or -p
491 options.
492
493
494
495 The swing subcommand supports the following options:
496
497 --help Output help text, do not execute the install subcommand.
498
499
500 -R alt_root Use the specified alternate root to locate the database.
501
502 Note -
503
504 The root file system of any non-global zones must not
505 be referenced with the -R option. Doing so might dam‐
506 age the global zone's file system, might compromise
507 the security of the global zone, and might damage the
508 non-global zone's file system. See zones(5).
509
510
511
512 The uninstall subcommand supports the following options:
513
514 -f Force the uninstall. A forced subcommand uninstalls all
515 instances of a component, even if there are multiple
516 ambiguous instances of the uuid operand.
517
518
519 --help Output help text, do not execute the unregister subcom‐
520 mand.
521
522
523 -i instance Disambiguate the uuid operand.
524
525
526 -p location Disambiguate the uuid operand. location corresponds to
527 the where the software component was installed.
528
529
530 -R alt_root Use the specified alternate root to locate the database.
531
532 Note -
533
534 The root file system of any non-global zones must not
535 be referenced with the -R option. Doing so might dam‐
536 age the global zone's file system, might compromise
537 the security of the global zone, and might damage the
538 non-global zone's file system. See zones(5).
539
540
541 -u uuid Unregister the uuid component. If this component has
542 been installed multiple times, the instance to unregis‐
543 ter must be indicated unambiguously by using the -i or
544 -p option.
545
546
547
548 The unregister subcommand supports the following options:
549
550 -f Force the unregistration. A forced subcommand unregis‐
551 ters a component even if there are other components
552 which are dependent on this component.
553
554
555 --help Output help text, do not execute the unregister subcom‐
556 mand.
557
558
559 -i instance Disambiguate the uuid operand.
560
561
562 -p location Disambiguate the uuid operand. The location corresponds
563 to the where the software component was installed.
564
565
566 -r Causes a recursive deregistration of a component as well
567 as that component's children and dependencies.
568
569
570 -R alt_root Use the specified alternate root to locate the database.
571
572 Note -
573
574 The root file system of any non-global zones must not
575 be referenced with the -R option. Doing so might dam‐
576 age the global zone's file system, might compromise
577 the security of the global zone, and might damage the
578 non-global zone's file system. See zones(5).
579
580
581 -u uuid Unregister component uuid of the component to unregis‐
582 ter. If this component has been installed multiple
583 times, the instance to unregister must be indicated
584 unambiguously by using the -i or -p option.
585
586
588 The following operands are supported:
589
590 alt_root Pathname to a file indicating an alternate root. The
591 Solaris Product Registry database is located relative to
592 the alternate root. If database relative to this location
593 does not exist, it is created.
594
595 Note -
596
597 The root file system of any non-global zones must not be
598 referenced by alt_root. Doing so might damage the global
599 zone's file system, might compromise the security of the
600 global zone, and might damage the non-global zone's file
601 system. See zones(5).
602
603
604 attr Name of an attribute. This operand is used only with the
605 info subcommand. If attr is associated with a component,
606 the attribute name and value is displayed.
607
608
609 bnum The browse number.
610
611 Each component in the Solaris Product Registry is associ‐
612 ated with a browse number. This number is generated for the
613 convenience of an interactive user. The browse number can
614 change if the system is rebooted or reinstalled. Do not
615 store or use the browse number except to facilitate the
616 browse and info subcommands. Browse numbers are always out‐
617 put by the prodreg browse subcommand. Only these values can
618 be used as input values to the browse or info subcommand.
619
620
621 instance Software can be installed in more than one location. The
622 Solaris Product Registry associates a unique instance num‐
623 ber for each. The browse subcommand shows the instance num‐
624 ber associated with each component in the registry. The
625 instance operand is used to distinguish between installed,
626 and possibly different, copies of software, when such
627 exist.
628
629
630 location A path to a specific file or directory in the file system.
631 This operand indicates the installed location of registered
632 software. For instance, if software is installed relative
633 to /usr/local the value of this operand would be
634 /usr/local. The install location is used to installer or to
635 indicate the location of an installer or to disambiguate
636 which instance is intended, of a software component which
637 can have multiple instances.
638
639
640 name Each software component in the Solaris Product Registry is
641 associated with a name. This name is output by the browse
642 subcommand. Some subcommands allow the user to input the
643 software by name as an operand as a convenience. These
644 names might not be unique. If the user supplies an ambigu‐
645 ous name, for which more than one components exist, the
646 subcommand outputs a list of possible choices. The name can
647 be localized; depending on the language setting the name
648 can differ.
649
650
651 uuid Each software component in the Solaris Product Registry is
652 associated with a unique identifier. This identifier is a
653 handle which accesses an entry in the registry database.
654 The uuid corresponds to the component irrespective of how
655 many instances of the component have been installed, and
656 what the localized name of the component is.
657
658
660 Example 1 Using the prodreg Command to Browse
661
662
663 Browsing is performed by means of the prodreg browse subcommand. Using
664 these requests iteratively, one can peruse the tree, much as one would
665 using a GUI by expanding components which are collections of other com‐
666 ponents. Browsing using browse numbers for convenience should be done
667 only during this iterative browsing process, since the numbers are gen‐
668 erated as a result of the browsing operation.
669
670
671
672 Evoking the browse subcommand without any arguments browses from the
673 top of the registry. The output varies depending on the software
674 installed on a particular system.
675
676
677 $ prodreg browse
678 BROWSE # +/-/. UUID # NAME
679 ======== ===== ==================================== = ============
680 1 - root 1 System
681 Registry
682 2 + a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
683 System
684 Software
685 3 + 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified
686 Software
687
688
689
690
691 The output of this command lists the browse number, UUID, instance num‐
692 ber and name of the root component and its children. The ancestors of a
693 component, each parent up to the root, are also shown. The +/-/. column
694 indicates whether the component in the tree is an expanded parent (-),
695 a child with children (+) or a child without children (.).
696
697
698 Example 2 Requesting Information About the Components in a Tree
699
700
701 The UUID, name and browse number fields can be used to request browsing
702 information about components in the tree. The next example shows how a
703 component can be browsed by UUID.
704
705
706 $ prodreg browse -u a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b
707 BROWSE # +/-/. UUID # NAME
708 ======== ===== ==================================== = ===========
709 1 - root 1 System
710 Registry
711 2 - a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
712 System
713 Software
714 4 + b96ae9a9-1dd1-11b2-a3f2-0800209a5b6b 1 System
715 Software
716 Localizations
717 5 + SUNWCall 1 Entire
718 Distribution
719
720
721
722 Example 3 Browsing a Node by Name
723
724
725 The following example shows how a node can be browsed by name.
726
727
728 $ prodreg browse -m "System Software Localizations"
729 BROWSE # +/-/. UUID # NAME
730 ======== ===== ==================================== = ===========
731 1 - root 1 System
732 Registry
733 2 - a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
734 System
735 Software
736 4 - b96ae9a9-1dd1-11b2-a3f2-0800209a5b6b 1 System
737 Software
738 Localizations
739 316 . SUNWceuow 1 Central
740 Europe OW
741 Support
742 317 . SUNWcsfw 1 Simplified
743 Chinese
744 freeware
745 message
746 318 . SUNWceuox 1 Central
747 Europe
748 64-bit OS
749 Support
750
751
752
753 Example 4 Browsing Iteratively
754
755
756 Additional output has been omitted. As a convenience, the browse number
757 can be used for iterative browsing. This number should not be stored,
758 as it differs depending on which system the prodreg command is run on,
759 which user is running the command, and the log in session in which the
760 command is run.
761
762
763 $ prodreg browse -n 3
764
765 BROWSE # +/-/. UUID # NAME
766 ======== ===== ==================================== = ===========
767 1 - root 1 System
768 Registry
769 2 - a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
770 System
771 Software
772 5 - SUNWCall 1 Entire
773 Software
774 Distribution
775 6 . SUNWrsmo 1 RSMPI
776 Operations
777 Registration
778 Module
779 7 + SUNWCjvx 1 JavaVM
780 (64-bit)
781 8 . SUNWrsmx 1 Remote
782 Shared
783 Memory
784 (64-bit)
785 9 + SUNWCacc 1 System
786 Accounting
787
788
789
790 Example 5 Browsing Using an Ambiguous Value
791
792
793 If the requested value is ambiguous, the list of ambiguous instances
794 are displayed. In the following example, there are two distinct soft‐
795 ware components with the same name.
796
797
798 $ ./prodreg browse -m JavaVM
799 The request failed because multiple components correspond to the
800 criteria given. Use the list of possible components given below,
801 select one and try again.
802
803 BROWSE # +/-/. UUID # NAME
804 ======== ===== ==================================== = ===========
805 12 . org.spybeam.javavm 1 JavaVM
806 51 . SUNWCjv 1 JavaVM
807
808
809
810
811 Issue one of the following requests again:
812
813
814 $ prodreg browse -u SUNWCjv
815
816
817
818
819 or
820
821
822 $ prodreg browse -u org.spybeam.javavm
823
824
825
826 Example 6 Browsing Multiple Installations of Software
827
828
829 Another possible ambiguous response arises when a particular software
830 component is installed multiple times. In the example below Example
831 software is registered three times.
832
833
834 $ prodreg browse -m Example
835 The request failed because multiple components correspond to the
836 criteria given. Use the list of possible components given below,
837 select one and try again.
838 BROWSE # +/-/. UUID # NAME
839 ======== ===== ==================================== = ===========
840 7 . org.spybeam.example 2 Example
841 7 . org.spybeam.example 3 Example
842 7 . org.spybeam.example 1 Example
843 The component requested could not be found.
844
845
846
847 Example 7 Browsing Using a Particular Instance
848
849
850 The request can be repeated specifying a particular instance to disam‐
851 biguate it. It is also possible to disambiguate a request with the -p
852 option, followed by the install location. In this case, to browse the
853 first instance of the Example software, one would use the command:
854
855
856 $ prodreg browse -u org.spybeam.example -i 1
857
858
859
860 Example 8 Using the info Subcommand
861
862
863 The install location, as well as other attributes of a component can be
864 obtained with the info subcommand. The info subcommand accepts the same
865 disambiguating options and returns all the attributes of a component,
866 each on a single line.
867
868
869 $ prodreg info -m Example
870 The request failed because multiple components correspond to the
871 criteria given. Use the list of possible components given below,
872 select one and try again.
873 BROWSE # +/-/. UUID # NAME
874 ======== ===== ==================================== = ===========
875 7 . org.spybeam.example 2 Example
876 7 . org.spybeam.example 3 Example
877 7 . org.spybeam.example 1 Example
878 The component requested could not be found.
879
880
881
882
883 This variation of the info subcommand outputs all information associ‐
884 ated with instance 1 of the Example component. The output from this
885 variation is not displayed
886
887
888 $ prodreg info -u org.spybeam.example -i 1
889
890
891
892 Example 9 Obtaining Information on the Install Location
893
894
895 You can use the info subcommand to obtain the install location and
896 other attributes of a component. The info subcommand accepts the same
897 disambiguating options as the browse subcommand. It returns all the
898 attributes of a component, each on a single line. You can also request
899 a single attribute.
900
901
902
903 The following command outputs the value of the install location
904 attribute:
905
906
907 $ prodreg info -n 23 -a Location
908
909
910
911 Example 10 Idenitifying and Unregistering Damaged Software
912
913
914 Removing installed software without using the associated uninstaller
915 can damage the software in the registry. A damaged component indicates
916 that certain software is installed, when in fact it is not present. A
917 component can be damaged by removing files or packages directly, with‐
918 out running the associated uninstaller. The general rule to follow is:
919 If software has been installed by an installer program, it should be
920 uninstalled using the supplied uninstaller program.
921
922
923
924 This example shows how to identify and repair damaged software compo‐
925 nents so that software can be reinstalled.
926
927
928
929 Browsing for Examplesoft, produces the following:
930
931
932 $ prodreg browse -m Examplesoft
933 BROWSE # +/-/. UUID # NAME
934 ======== ===== ==================================== = ============
935 1 - root 1 System
936 Registry
937 2 + a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
938 System
939 Software
940 3 + 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified
941 Software
942 4 - 95842091-725a-8501-ef29-0472985982be 1 ExampleSoft
943 233 . 90209809-9785-b89e-c821-0472985982be 1 Example Doc
944 234 . EXSOzzt 1
945 235 . EXSOblob 1 Example Data
946
947
948
949
950 The Examplesoft child EXSOzzt, representing a package component of reg‐
951 istered software does not display its name. This is likely to be
952 because the software Examplesoft is damaged. Verify this with the fol‐
953 lowing command:
954
955
956 $ prodreg info -u 95842091-725a-8501-ef29-0472985982be \
957 -i 1 -d
958 isDamaged=TRUE
959
960
961
962
963 Since Damaged is TRUE, some part of Examplesoft is damaged. The follow‐
964 ing command lists the packages which make up Examplesoft:
965
966
967 $ prodreg info \
968 -u 95842091-725a-8501-ef29-0472985982be\
969 -i 1 -a PKGS pkgs:
970 EXSOzzt EXSOblob
971
972
973
974
975 Use the pkginfo command to verify if EXSO is installed:
976
977
978 $ pkginfo EXSOzzt
979 ERROR: information for "EXSOzzt" was not found
980 $ pkginfo EXSOblob
981 application EXSOblob Example Data
982
983
984
985
986 The output of these commands shows that the package EXSOzzt has been
987 removed, probably with the pkgrm command. The Examplesoft software will
988 probably not function. To repair the software, one should run the
989 uninstaller registered with Examplesoft. You probably need to run the
990 uninstaller with root permissions, as it unregisters the software and
991 runs pkgrm commands. Both of these operations require root permissions.
992
993
994 # prodreg uninstall -u 95842091-725a-8501-ef29-0472985982be -i 1
995 The install program requested could not be found.
996
997
998
999
1000 Something is wrong, or else you would be able to access uninstall pro‐
1001 gram to uninstall the software. One possibility is that the uninstaller
1002 program has been removed manually. It is possible to determine where
1003 the uninstaller is located by requesting the uninstallprogram
1004 attribute:
1005
1006
1007 $ prodreg info -m ExampleSoft -a uninstallprogram
1008 uninstallprogram: /usr/bin/java -mx64m -classpath
1009 /var/sadm/prod/org.example.ExampleSoft/987573587 uninstall_ExampleSoft
1010
1011
1012
1013
1014 Check to see if there is an uninstaller in the registered location.
1015
1016
1017 # ls /var/sadm/prod/org.example.ExampleSoft/987573587
1018 /var/sadm/prod/org.example.ExampleSoft/987573587:
1019 No such file or directory
1020
1021
1022
1023
1024 Since there is no uninstaller at the desired location, you have two
1025 options. One is to load the uninstaller from back up storage and run it
1026 manually. Use the command line stored in the registry:
1027
1028
1029 # /usr/bin/java -mmx64m -classpath \
1030 /var/sadm/prod/org.example.ExampleSoft/987573587 \
1031 uninstall_ExampleSoft
1032
1033
1034
1035
1036 If there is no other possibility, manually unregister the software.
1037
1038
1039 # prodreg unregister -u 95842091-725a-8501-ef29-0472985982be -i 1
1040
1041
1042
1043
1044 This does not remove the remaining package EXSOblob. You must do this
1045 manually.
1046
1047
1048 # pkgrm EXSOblob
1049
1050
1051
1052 Example 11 Removing Multiple Components
1053
1054
1055 Component A has children B and C, and C has children D and E, and the
1056 you wish to remove all of the components at once. This is useful if the
1057 whole hierarchy has to be reinstalled and the uninstaller has been lost
1058 or cannot be run
1059
1060
1061 $ prodreg browse -u UUID-of-C
1062 BROWSE # +/-/. UUID # NAME
1063 ======== ===== ==================================== = ============
1064 1 - root 1 System
1065 Registry
1066 2 + a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10
1067 System
1068 Software
1069 3 + 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified
1070 Software
1071 1423 - UUID-of-A 1 Example A
1072 1436 . UUID-of-B 1 Example B
1073 1437 - UUID-of-C 1 Example C
1074 1462 . UUID-of-D 1 Example D
1075 1463 . UUID-of-E 1 Example E
1076
1077 # prodreg uninstall -u UUID-of-A -i 1
1078
1079
1080
1081
1082 The uninstall subcommand can fail various ways, for example if the java
1083 classes have been removed, if the user has insufficient permissions or
1084 if Java software is not present on the system. The recursive unregis‐
1085 tration subcommand is very powerful and dangerous. Not only does it
1086 unregister every child of a component, it also unregisters every compo‐
1087 nent which depends upon the component to unregister. It is a good idea
1088 to view all information about the component to determine if any compo‐
1089 nents will be unintentionally unregistered with UUID-of-A.
1090
1091
1092 $ prodreg info -u UUID-of-A
1093 Title: Example A Software
1094 Version: 5.8.0.2001.11.02
1095 Location: /usr
1096 Vendor: Example Vendor
1097 uninstallprogram: /usr/bin/java -mx64m -classpath
1098 /var/sadm/prod/org.example.ExampleA/90820965 uninstall_ExampleA
1099 vendorurl: http://www.example.org
1100 description: Example A Software has many uses
1101 Supported Languages: en
1102
1103 Child Components:
1104 Name UUID #
1105 -------------------------- ------------------------------------ -
1106 Example B UUID-of-B 1
1107 Example C UUID-of-C 1
1108
1109 Required Components:
1110 Name UUID #
1111 -------------------------- ------------------------------------ -
1112 Example B UUID-of-B 1
1113 Example C UUID-of-C 1
1114
1115
1116
1117
1118 No software depends on Example A, or else an additional field, Depen‐
1119 dent Components would be shown. To further ensure that there are no
1120 surprises, one should examine the dependent components and children of
1121 UUID-of-B and UUID-of-C, all the components which depend on UUID-of-B,
1122 UUID-of-C and their children, and so on.
1123
1124
1125
1126 If you examine the browse tree, you know the entire list of descendents
1127 of UUID-of-A. You can also examine the dependent component attributes
1128 of all of Example A's descendents.
1129
1130
1131 $ prodreg info -u UUID-of-B -i 1 -a "Dependent Components"
1132 Dependent Components:
1133 Name UUID #
1134 --------------------------- ------------------------------------ -
1135 Example A UUID-of-A 1
1136
1137 $ prodreg info -u UUID-of-C -i 1 -a "Dependent Components"
1138 Dependent Components:
1139 Name UUID #
1140 --------------------------- ------------------------------------ -
1141 Example A UUID-of-A 1
1142
1143 $ prodreg info -u UUID-of-D -i 1 -a "Dependent Components"
1144 Dependent Components:
1145 Name UUID #
1146 --------------------------- ------------------------------------ -
1147 Example C UUID-of-C 1
1148
1149 $ prodreg info -u UUID-of-E -i 1 -a "Dependent Components"
1150 Dependent Components:
1151 Name UUID #
1152 --------------------------- ------------------------------------ -
1153 Example C UUID-of-C 1
1154
1155
1156
1157
1158 A recursive unregistration of Example A only results in unregistering
1159 Example A and its descendents, as intended.
1160
1161
1162 # prodreg unregister -r -u UUID-of-A -i 1
1163
1164
1165
1166 Example 12 Reinstalling a Damaged Component
1167
1168
1169 In this example, there is a component, Software ZZZ which is depended
1170 upon by other software. Software ZZZ has been damaged and you need to
1171 reinstall it. The reinstallation is impossible until Software ZZZ is
1172 unregistered.
1173
1174
1175
1176 First, you check what depends upon Software ZZZ:
1177
1178
1179 $ prodreg info -m "Software ZZZ" -a "Dependent Components"
1180 Dependent Components:
1181 Name UUID #
1182 --------------------------- ------------------------------------ -
1183 Software Foobar d9723500-9823-1432-810c-0100e09832ff 1
1184
1185
1186
1187
1188 Normally, you would have to uninstall Software Foobar before unregis‐
1189 tering Software ZZZ, since Software Foobar depends on Software ZZZ. You
1190 decide that it is impossible or unreasonable to reinstall Software Foo‐
1191 bar. Performing a recursive unregister of Software ZZZ is not an option
1192 as it would unregister Software Foobar as well. Instead you can do a
1193 forced unregister of Software ZZZ. The UUID of Software ZZZ is
1194 90843fb1-9874-3a20-9b88-984b32098432.
1195
1196
1197 # prodreg unregister -f -u 90843fb1-9874-3a20-9b88-984b32098432 -i 1
1198
1199
1200
1201
1202 You can then reinstall Software ZZZ:
1203
1204
1205 # /usr/bin/java -cp /usr/installers/org.example.softwarezzz
1206
1207
1208
1210 The registry can become out of date because of software being manually
1211 removed, or removed using pkgrm(1M) directly. To avoid damaging the
1212 registry, use uninstall programs to remove software which was initially
1213 installed using an install program.
1214
1216 The following environment variable affects the execution of prodreg:
1217
1218 PKG_INSTALL_ROOT If present, defines the full path name of a direc‐
1219 tory to use as the system's PKG_INSTALL_ROOT path.
1220 All product and package information files are then
1221 looked for in the directory tree, starting with the
1222 specified PKG_INSTALL_ROOT path. If not present,
1223 the default system path of / is used.
1224
1225
1227 The following exit values are returned:
1228
1229 0 Successful completion.
1230
1231
1232 >0 An error occurred.
1233
1234
1236 See attributes(5) for descriptions of the following attributes:
1237
1238
1239
1240
1241 ┌─────────────────────────────┬─────────────────────────────┐
1242 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
1243 ├─────────────────────────────┼─────────────────────────────┤
1244 │Availability │SUNWwsr2, SUNWwsrv │
1245 ├─────────────────────────────┼─────────────────────────────┤
1246 │Interface Stability │Evolving │
1247 └─────────────────────────────┴─────────────────────────────┘
1248
1250 pkgadd(1M), pkgrm(1M), wsreg_can_access_registry(3WSREG), libws‐
1251 reg(3LIB), live_upgrade(5), attributes(5)
1252
1253
1254 Application Packaging Developer's Guide
1255
1257 The prodreg GUI and command line interface view both the Solaris Prod‐
1258 uct Registry and the package database. Both look like components in the
1259 registry, but some of these cannot be unregistered or uninstalled.
1260 Packages do not have an associated uninstaller, so they cannot be unin‐
1261 stalled using the prodreg uninstall subcommand. Solaris packages cannot
1262 be unregistered using the prodreg unregister subcommand. Packages are
1263 removed using the pkgrm(1M) command, after which time the packages do
1264 not appear in the GUI or CLI prodreg viewer.
1265
1266
1267 It is preferable to remove software using the uninstaller associated
1268 with the software installed than to remove individual packages using
1269 pkgrm(1M), since the uninstaller software takes care of comprehensive
1270 removal of all resources associated with the installed software,
1271 including unregistering information in Registry and removing the appro‐
1272 priate packages.
1273
1274
1275 The prodreg uninstall subcommand launches an external program. The com‐
1276 mand line conventions of these programs have to be used to indicate the
1277 alternate root for the product registry. Another possibility is to use
1278 the PKG_INSTALL_ROOT environment variable for this purpose as the
1279 install program is executed in the same environment as prodreg. Unin‐
1280 stall programs are frequently java classes which require Java to be
1281 installed. If Java software has been removed or is missing from a
1282 Solaris distribution, it is impossible to run java based uninstallers.
1283
1284
1285 Only the prodreg unregister and uninstall subcommands can only be run
1286 with root permissions. This is because they modify the product registry
1287 in the case of unregister, and remove packages in the case of unin‐
1288 stall. The other operations merely read the registry and can be run
1289 with any user permissions. The prodreg uninstall subcommand might
1290 require root permissions as well, as installers can execute commands
1291 such as pkgadd(1M) or pkgrm(1M) which require root permissions to run.
1292
1293
1294 Attributes associated with components are documented in various places
1295 -primarily in the Application Packaging Developer's Guide. The
1296 attributes associated with the Solaris Product Registry itself are
1297 described in the following glossary.
1298
1299 Dependent Components List of components upon which the component
1300 depends.
1301
1302
1303 Location The location relative to which software was
1304 installed.
1305
1306
1307 pkgs List of packages which correspond to the compo‐
1308 nent. These packages are added with pkgadd
1309 after the component is registered. They are
1310 removed with pkgrm before the component is
1311 unregistered.
1312
1313
1314 Required Components List of components on which the component
1315 depends.
1316
1317
1318 Source Media from which the install was done.
1319
1320
1321 Supported Languages List of locales for which there are registered
1322 titles.
1323
1324
1325 Title Name given by the prodreg browse subcommand.
1326 This name can be localized to the locale in
1327 which the shell is running.
1328
1329
1330 Unique Name Name used by previous versions of the Solaris
1331 Product Registry. This value is often set to
1332 the package name corresponding to a given com‐
1333 ponent in the registry.
1334
1335
1336 Vendor Vendor who produced the component.
1337
1338
1339 Version Version string associated with the component.
1340
1341
1342
1343 The Registry can contain components which do not correspond to software
1344 actually installed on the system. This can be detected several ways.
1345 The easiest is to check using the info subcommand if a component is
1346 damaged. Another way is to determine where software was installed using
1347 the info subcommand, and verify it is still there.
1348
1349
1350
1351SunOS 5.11 6 Apr 2005 prodreg(1M)