Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2561, March 2013)

3. Check for software being repackaged.
For each selected product, swpackage checks to see if the product already exists in the target
depot.
If it does exist, swpackage checks to see which filesets are being added (new filesets)
or modified.
If it exists and all filesets are selected, swpackage checks to see if any existing filesets
have been obsoleted by the new product.
4. Performing Disk Space Analysis (DSA)
swpackage verifies that the target depot has enough free disk space to package the selected
products.
If adequate disk space is available for the packaging operation to proceed, swpackage
writes a note to the log file to note the impact on disk space.
An error results if the package will encroach into the disk’s minfree space.
An error results if the package phase requires more disk space than is available.
If you set the enforce_dsa command option to false, swpackage changes disk space
errors to warnings and continues. This lets you cross into the minfree space to complete
a packaging operation.
Phase III: Build
When packaging a product, if the target depot does not exist, swpackage creates it. If it does
exist, swpackage will merge new product(s) into it. For each different version of the product, a
directory is created using the defined product tag attribute and a unique instance number (instance
ID) for all the product versions that have the same tag.
Before a new storage directory is created, swpackage checks to see if this product version has
the same identifying attributes as an existing product version.
If all the identifying attributes match, you are re-packaging (modifying) an existing version.
Otherwise, swpackage creates a new version in the target distribution.
The packaging process uses an explicit ordering to avoid corrupting the target distribution if a
fatal error occurs. Each product is packaged in its entirety and when all specified products have
been packaged successfully, the distribution’s global INDEX file is built/rebuilt. Within each product
construction, the following order is adhered to:
1. Check if the product is new or already exists. If it is new, create the product’s storage directory.
2. For each fileset in the product, copy the fileset’s files into their storage location (within the
product’s storage directory), and create the fileset’s catalog (database information) files.
3. After the individual filesets, create the product’s informational files (meta-files).
A target depot is only the first step in creating a CD-ROM. If the ISO 9660 standard format is
desired, a utility to perform this conversion would be necessary. This conversion is not supported
by swpackage.
Distribution tapes are created in tar format (although SD-UX commands can also read depots from
cpio format tapes). To create the tape, swpackage first builds the products into a temporary
distribution depot. (The depot is removed when swpackage completes.) To conserve space, all
files exist as references to the real source files. After the distribution depot is constructed, swpackage
then archives it, along with the real files, onto the tape device.
When archiving a product that contains kernel filesets onto a tape media, swpackage puts these
filesets first within the archive to provide efficient access by swinstall. swpackage also orders
filesets based on prerequisite dependency relationships.
10.5 Packaging the Software (swpackage) 197