Previous section.

Systems Management: Distributed Software Administration
Copyright © 1997 The Open Group


swpackage - package distribution


swpackage [-p][-f file][-s psf][-x option=value][-X options_file]
software_selections][@ targets]


The swpackage utility packages files from the local host into software objects that can be managed by the utilities in this Software Administration specification using the definitions from a PSF. The swpackage utility packages software into distributions that can be installed, copied or otherwise distributed or managed.


The swpackage utility supports the following options. Where there is no description, the description in Common Definition for Utilities applies.

-f file


-s psf

This option specifies the pathname of the PSF which describes the details of the packages that swpackage operates on.

-x option=value

-X options_file


The swpackage utility supports the software_selections and targets operands described in Common Definition for Utilities with one exception. The utility may support only a single, local distribution target.

If no software_selections are provided, all software described by the PSF is selected.

Whether data on an existing target distribution in serial format is overwritten or merged is implementation defined.


See Common Definition for Utilities for descriptions of external influences common to all utilities.

Extended Options

The swpackage utility supports the following extended options. The description in Common Definition for Utilities applies.














Product Specification File

See Software Packaging Layout .


See Common Definition for Utilities .


The swpackage utility consists of three phases:

  1. Selection Phase

  2. Analysis Phase

  3. Execution Phase

Selection Phase

Analysis Phase

The package analysis phase follows the following steps:

Execution Phase

The execution phase packages the source files and information into a product, and create/merge the product into the target distribution.

When creating a serial distribution, an implementation must support one or both of POSIX.1 extended cpio or extended tar archive formats. Whether an implementation supports writing both archive formats or only one, and which format is supported if only one, is implementation defined.

When packaging a product, the storage directory within the target distribution is created/updated directly by swpackage. For each unique version of the product, a directory is created using the defined product.tag attribute and a unique sequence number for all the product versions which use the same tag as specified in Software Packaging Layout .

The swpackage command generates certain attributes as specified in Software Definition File Format .

More complex rules apply when packaging attributes that inherit from the product to the fileset level. The filesets and is_locatable attributes are updated only by swpackage and swmodify. When packaging, the value of the filesets attribute is set to include all the filesets in the PSF, plus any others that exist in the distribution already but are not in the PSF. In the latter case, the user is warned that the PSF is not complete.

If undefined, the product.is_locatable attribute is set by swpackage if any of the filesets in the filesets list are locatable. If none of the filesets are locatable, or if that cannot be determined, then the value of the product.is_locatable attribute is set to false . If defined, the product.is_locatable attribute is used to define the value of the is_locatable attribute for any filesets that do not have is_locatable defined. If the value of the is_locatable attribute is defined at both the product and fileset level, then the fileset definition overrides the product definition.

Certain errors can occur when packaging the files:

Just as is done for swcopy, swpackage will support the reinstall_files and reinstall_files_use_cksum options. The semantics are the same.

When packaging a sparse fileset, only the files contained within the sparse fileset are included in the package definition. If an ancestor is not defined, then this sparse fileset can be applied to any fileset with the same tag, product tag, architecture, vendor_tag, and with a lower revision.


The swpackage utility returns:

The products specified in the PSF were successfully packaged onto the media.

An error occurred in parsing the PSF. The media was not modified.

An error during the packaging operation. The media has been modified. Review the log file for details.


See Common Definition for Utilities .

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index