Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Software Package Builder 2.0 User's Guide: for HP-UX 11i v1 and 11i v2 > Chapter 4 Getting Started with Software Package Builder

Using the SPB Command Line Interface

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

From the command line interface, you can perform the following tasks:

  • Edit a PSF

  • Validate a PSF

  • Specify a user-defined packaging policy rules file

Editing from the CLI

You can make edits to a PSF from the command line.To replace an attribute value for a specified file at the command line, use the following two options in combination:

  • The -f option specifies the PSF to be edited or validated.

  • The -e option specifies the attribute value(s) to be replaced in the PSF indicated by the -f option.

NOTE: The modified PSF is written to stdout unless re-directed to a file using the -o option.

Example

To replace the revision of product SPBdemo in the PSF file /opt/SPB/demo with revision A.2.0, you would enter the following:

spb -f /opt/SPB/demo -e SPBdemo revision A.2.0 -o SPBdemoRev2.psf

Validating from the CLI

To validate a specified file from the command line, use the following two options in combination: The -f option specifies the PSF to be edited or validated. The -V option validates the PSF indicated by the -f option.

  • The -f option specifies the PSF to be edited or validated.

  • The -V option validates the PSF indicated by the -f option.

Example

To validate the PSF file located in /opt/SPB/demo/demo1, you would type the following:

spb -f /opt/SPB/demo/demo1 -V

Incorporating SPB into Automated Processes

For packagers with automated processes, the build process usually includes generating a PSF. To take advantage of SPB's validation capability, include the SPB validation command after the PSF generation step in the automated process.

Example

To perform validation on the generated PSF, invoke the following command in your process:

spb -f psf_file -V 2> psferrors

where psf_file is the name of the generated PSF and psferrors is the file where validation errors are stored. Packagers can then examine this file and determine the appropriate course of action. You can debug the PSF using the SPB GUI with packaging policy help located in the Policy Help tab. The return values of the validation also indicate which message was the most severe message.

IMPORTANT: SPB cannot read a PSF from stdin, therefore, it cannot be used in a pipe symbol ( | ). The following command will not work correctly:

cat psf_file | spb -V

Return Values

Upon completion of the validation process using the CLI, SPB returns one of the following values to indicate the severity of the message:

0

Normal exit. Validation performed with no errors.

1

Validation found a warning.

2

Validation found an error.

For additional information on this and other SPB command line options, refer to the spb (1m) manpage.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2002-2004 Hewlett-Packard Development Company, L.P.