Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

POLYCENTER Software Installation Utility Developer's Guide


Previous Contents Index

5.4 Listing the Contents of the Product Kit

A product kit in sequential format is a container file. You can list its contents with the PRODUCT LIST command. In the following example, note:


$ PRODUCT LIST CHESS 
 
The following product has been selected: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
    
Do you want to continue? [YES] 
 
Files in _KRYSYS$DKA300:[TEST.KIT]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI 
 
-------------------------------------------------------- 
RELATIVE FILE SPECIFICATION 
-------------------------------------------------------- 
[000000]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI$TLB 
[000000]CHECK_SPACE.COM 
[SYSEXE]CHESS.EXE 
[SYSEXE]CHESS.GAMES 
[SYSEXE]CHESS.OPENINGS 
[SYSTEST]CHESS_IVP.COM 
[000000]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI$DESCRIPTION 
-------------------------------------------------------- 

Starting with OpenVMS Version 7.3, you can use the /FULL qualifier with the PRODUCT LIST command. The expanded output lists the following:

Note

Prior to OpenVMS Version 7.3, the PRODUCT LIST command did not list files in the kit that were associated with the uses or assemble uses option.

5.5 Extracting Files from the Kit

You can extract one or more files from a product kit using the PRODUCT EXTRACT and PRODUCT COPY commands. The PRODUCT EXTRACT command is often used with the PRODUCT LIST command to identify a file or a set of files to extract.

5.5.1 Extracting Files by Name

With the PRODUCT EXTRACT FILE command you can obtain a single file by name or a set of files with a wildcard file specification from a product kit. For example:


$ PRODUCT EXTRACT FILE CHESS /SELECT=*.EXE /LOG 
 
The following product has been selected: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
    
Do you want to continue? [YES] 
 
Portion done: 0% 
%PCSI-I-CREFIL, created DISK$WORK7:[TEST.KIT.][000000]CHESS.EXE;1 
Portion done: 100% 
%PCSIUI-I-SUCEXTRFIL, EXTRACT FILE operation completed successfully 

5.5.2 Extracting the PDF, PTF, or Release Notes

You can extract the PDF, PTF, or release notes file by name. If you do not know their names, use the folowing EXTRACT commands:

Every product kit contains a PDF. A PTF and a file designated as the release notes are optionally present in a kit.

The following illustrates how to obtain the PDF from a sequential kit:


$ SET DEFAULT [TEST.KIT] 
$ PRODUCT EXTRACT PDF CHESS /DESTINATION=[TEMP] /LOG 
 
The following product has been selected: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
    
Do you want to continue? [YES] 
 
Portion done: 0% 
%PCSI-I-CREFIL, created 
DISK$WORK7:[TEMP.][000000]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI$DESCRIPTION;1 
Portion done: 100% 
 
Product Description File has been extracted from the following product: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
%PCSIUI-I-SUCEXTRPDF, EXTRACT PDF operation completed successfully 

When you extract the PTF, the following two files are produced:


$ PRODUCT EXTRACT PTF CHESS /LOG 
 
The following product has been selected: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
    
Do you want to continue? [YES] 
 
Portion done: 0% 
%PCSI-I-CREFIL, created 
DISK$WORK7:[TEST.KIT.][000000]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI$TLB;1 
%PCSI-I-CREFIL, created 
DISK$WORK7:[TEST.KIT.][000000]ABC_CO-AXPVMS-CHESS-V0100--1.PCSI$TEXT;1 
Portion done: 100% 
Product Text File has been extracted from the following product: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
%PCSIUI-I-SUCEXTRPTF, EXTRACT PTF operation completed successfully 

Use the PRODUCT EXTRACT RELEASE_NOTES command to examine any release notes file that may be present in the kit. This command always places the release notes (named DEFAULT.PCSI$RELEASE_NOTES) in the user's default directory.


$ SET DEFAULT [TEMP] 
$ PRODUCT EXTRACT RELEASE_NOTES CHESS /SOURCE=[TEST.KIT] 
 
The following product has been selected: 
    ABC_CO AXPVMS CHESS V1.0               Layered Product 
    
Do you want to continue? [YES] 
 
Portion done: 0%...100% 

5.5.3 Converting a Sequential Kit into Reference Format

You can use the PRODUCT COPY command to extract files from a kit in sequential format and place them in reference format. This differs in a number of ways from extracting all files from a sequential kit into a specific directory using the PRODUCT EXTRACT FILE command. When copying a kit into reference format, the files are placed in a directory tree as they would appear after installation on the user's system. Unlike the installation of a sequential kit, however, temporary files from the kit are placed in the directory tree and files pertaining to all options are extracted.

You can also use the PRODUCT COPY command to convert a reference kit into sequential format, and for copying a kit while preserving its format.

5.6 Displaying Information from the Product Database

After the product kit is installed, you can use the PRODUCT SHOW PRODUCT command to list the products installed on the system. Use the /FULL qualifier for additional information about software references and patches that may have been applied to the products. Additional commands (not shown here) that are useful for obtaining more information about installed products are the PRODUCT SHOW HISTORY /FULL and PRODUCT SHOW OBJECT /FULL commands.


$ PRODUCT INSTALL CHESS  ! /LOG and /TRACE are useful for debugging 
. 
. 
. 
$ PRODUCT SHOW PRODUCT 
----------------------------------- ----------- ------------ 
PRODUCT                             KIT TYPE    STATE 
----------------------------------- ----------- ------------ 
ABC_CO AXPVMS CHESS V1.0            Full LP     Installed 
DEC AXPVMS DECNET_PHASE_IV V7.1     Full LP     Installed 
DEC AXPVMS DWMOTIF V1.2-4           Full LP     Installed 
DEC AXPVMS VMS V7.1                 Transition  Installed 
----------------------------------- ----------- ------------ 
 
4 items found 


Chapter 6
Advanced Topics

This chapter contains information about the following advanced concepts:

In addition, it presents flow diagrams depicting the execution of several PRODUCT commands.

6.1 Using Command Procedures in PDL Statements

The Product Description Language provides statements that perform common kit installation tasks such as creating directories, copying files to the target disk, updating libraries, displaying informational messages, and so on. There are times, however, when you might need to perform tasks that are unique to your product. For example, a new version of a product might need to detect the existence of a data file from a previous version and convert it to a new format. Or, you might want to probe the operating environment or ask the user specific questions before an installation may proceed.

To support this type of customization, the PDL provides several execute statements. These statements let you include command procedures (or individual DCL commands) that are run during certain phases of a product install, upgrade, reconfigure, or remove operation. These statements are:

The following table lists the PDL statements you can use to run command procedures (or individual DCL commands) that you provide. The statements are listed in the order of their execution during an installation, reconfiguration, or remove operation. Note that the table distinguishes between a new installation and an upgrade installation. The term upgrade denotes replacement of an installed version of a product by a higher, lower, or the same version of the product.

Table 6-1 Command Procedure Execution by Operation
PDL Statements
Listed in the Order of Execution
PRODUCT INSTALL
1st Time
PRODUCT INSTALL
Upgrade
PRODUCT RECONFIGURE PRODUCT REMOVE
execute preconfigure yes yes yes no
execute ...stop no yes 1 no yes
execute ...remove no no no yes
execute upgrade no yes 1 no no
file statement using assemble execute yes yes yes 2 no
execute install... yes yes yes no
execute start... yes yes no no
execute postinstall yes yes yes no
execute test yes yes yes no
execute login no 3 no 3 no 3 no
execute start...stop no 3 no 3 no 3 no
execute abort yes 4 yes 4 yes 4 no


1Only commands from the execute statement of the product being removed are run.
2The file is created only if the statement is part of a configuration option that the reconfiguration operation selects for the first time.
3The only action performed at this time is to display a message to the user.
4Commands from the execute abort statement are run only when an error condition causes the operation to terminate.

6.1.1 Non-Interactive and Interactive Mode

The mode (non-interactive or interactive) in which an execute statement runs determines the following:

By default an execute statement runs in non-interactive mode. You can specify interactive mode with the interactive option. For example, the following command sets up a command procedure to run in interactive mode when the product is installed:


execute postinstall "@PCSI$DESTINATION:[SYSUPD]CONFIGURE.COM" interactive ; 

In both non-interactive and interactive modes, the utility checks the final exit status of a command procedure (or individual DCL command) to determine whether or not the execute statement completed successfully or failed. Although error messages generated by a command procedure are displayed to the user, this does not determine its success or failure. The utility bases this decision solely on the final exit status. It is the kit developer's responsibility to ensure that proper status is conveyed to the utility upon termination of any command procedure incorporated into the kit.

The following table compares non-interactive and interactive mode.

Table 6-2 Non-Interactive vs. Interactive Mode
Non-Interactive Mode (default) Interactive Mode
Used when you do not specify the interactive option Used when you specify the interactive option
At the start of processing a PRODUCT command, the utility creates a detached subprocess using the $CREPRC system service. This subprocess is re-used to run the commands from all of the execute statements specified to run in non-interactive mode. 1 The utility creates a new subprocess using the LIB$SPAWN run-time library routine for each execute statement whose commands are to run interactively. All the commands specified for the same execute statement are performed, then the subprocess is terminated.
Interaction with the user is not possible. The utility communicates with the subprocess through mailboxes. It filters all output from the subprocess, only displaying lines of output to the user that resemble error messages (i.e., lines beginning with a percent sign). All other lines of output are discarded. Communication with the subprocess is performed through the user's terminal connection. The utility does not monitor input to or output from the subprocess. This enables a command procedure to enter into a dialog with the user (i.e., display text and solicit responses from the user).
The utility obtains exit status from the value of the $STATUS symbol received in response to a SHOW SYMBOL $STATUS command it sends to the subprocess. Status is queried in this manner for each DCL command you specify in the execute statement (e.g., "@a.com", "show symbol $status", "@b.com", "show symbol $status",...). If the command refers to a command procedure (e.g. "@c.com"), status is checked only when the command procedure exits. Exit status is obtained from the final status value returned from the LIB$SPAWN routine (the value of the $STATUS symbol from the last DCL command executed). Since a new subprocess is created for the execution of each command procedure (or individual DCL commands) you specify, the same level of status checking is performed for interactive mode as is done for non-interactive mode, although the technique is different.


1The utility may also perform other actions in the same subprocess, such as the updating of libraries using the LIBRARIAN command.

6.1.2 Packaging a Command Procedure

You can package command procedure files that run from execute statements in two ways:

Keep the following rules in mind:

6.1.3 Logical Names for Subprocess Environments

In preparation for running command procedures (or individual commands) specified in execute statements, the utility defines up to three logical names:

Command procedures use these logical names in the context of the subprocess in which they are run. The logical name environment differs depending on the execute statement being used. For more information, see the descriptions for individual execute statements in Chapter 7.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
5952PRO_006.HTML