HP Software Package Builder (SPB) manual Incorporating SPB into Automated Processes, Return Values

Page 42

Getting Started with Software Package Builder

Using the SPB Command Line Interface

ExampleTo 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.

42

Chapter 4

Image 42
Contents Edition Manufacturing Part Number DecemberCopyright Notice WarrantyGovernment License Trademark NoticesPublication History Typographic Conventions Contents Glossary Index Introduction to Software Features Features BenefitsSoftware Package Builder Overview Software Package Builder and HP-UX Software DistributorSoftware Package Builder Overview To access Java configuration information System RequirementsOptimizing Java Installation Overview InstallationTo download SPB from the Web Starting Software Package Builder Specifying Packaging Policy Rules FilePage Software Packaging Software Packaging Overview Software Packaging Lifecycle Software packaging lifecycle is displayed in FigureSoftware Packaging Lifecycle TIP Software Package Structure Organizing FilesystemsSoftware Elements Software Package Structure Software Package Hierarchy Software Package HierarchyStructural Elements Functions and Relationships Structural Function Relationship ElementSoftware Package Structure Product Specification File AttributesRecommended Attribute Values Required Attribute ValuesSoftware Element Required Attribute Software Element Recommended AttributePackaging Policies Page Software Package Builder Introduction Screen Regions Package StructureAttribute Table Messages Tab Policy Help TabPSF View Menus Tool BarAdditional Information Page Getting Started with Software To create a PSF Getting Started Using the SPB GUICreating a New PSF To create a product and add filesetsTo create a destination filesystem Managing Fileset ContentStep From the Structure menu, select Add Elements Files Step Click Add DirectoryValidating a PSF To set file or directory permissionsSetting Attributes To filter the attribute displayTo set attributes You enter new data into the PSF, SPB re-validates the file Validating from the CLI Using the SPB Command Line InterfaceEditing from the CLI ExampleIncorporating SPB into Automated Processes Return ValuesAdditional Information Advanced Features Managing Fileset Content Manage Fileset Content Dialog Box File Mapping Using Advanced FeaturesRegions OptionsSetting File Mapping OptionsTo set the recursive option To set the file * or include option Add Mode field of the Directory Attributes and File AttributesFile Mode Access PermissionsTo apply a mode to all files Step Select Apply to AllAttributes table To change the default representation of the Mode field Step Select the Advanced Options buttonPermissions Selections Managing Fileset Content Creating and Using a Subproduct To create a subproductSubproduct Creating and Using a Bundle To create a bundleCreating and Using a Vendor or Category To add a vendor or categoryAttribute Table To edit a vendor defined attribute Creating and Using Vendor Defined AttributesTo create a vendor defined attribute AttributesOverview of Software Specification Attributes Software Specification AttributesDependency Attributes Software SpecificationsResolving SPBSoftware Specification Status Working with Dependency AttributesSPB will not To add a dependency attribute using the and relationship Click Add Set To add a dependency attribute using the or relationshipSelect Structure Add Elements Corequisites Click AddTo add remote content as a dependency attribute Click Add ContentStep Select Structure Add Elements Corequisites Using Control Scripts Using Control Scripts Additional Information Page Glossary GlossaryMultiple architecture Optional attribute Tag Unconfigure script Unconfigure script Glossary Index Software elements, 20 bundle, 21 category Index