Packaging your software applications

12. Creating a package with pkgtrans

pkgtrans(C) performs the following package translations:

To perform one of these translations, execute:
   pkgtrans -s device1 device2 [pkg1[,pkg2[ . . . ]]]
where -s is the option to translate to datastream, device1 is the name of the device or directory where the package currently resides, device2 is the name of the device onto which the translated package will be placed, and [pkg1[pkg2 . . . ]] is one or more package names. If no package names are given, a menu of all packages residing in device1 is displayed and the user asked for a selection.

Creating a datastream package

Creating a datastream package requires two steps:

  1. Create a package using pkgmk(C).

    Use the default device (the installation spool directory) or name a directory into which the package should be placed. pkgmk(C) creates a package in a fixed directory format. Specify the capacity of the device where the datastream will be placed as an argument to the -l option.

  2. After the software is formatted in fixed directory format and is residing in a spool directory, execute pkgtrans(C).

    This command translates the fixed directory format to the datastream format and places the datastream on the specified medium.

For example, the two steps shown below create a datastream package:

  1. pkgmk -d spooldir -l 1400

    This formats a package into a fixed directory structure and places it in a directory named spooldir. Each part of the package requires no more than 1400 blocks.

  2. pkgtrans -s spooldir 9track package1

    This translates the fixed directory format of package1 residing in the directory spooldir into a datastream format, and places the datastream package on the medium in a device named 9track.


  3. pkgtrans -s spooldir diskette package1

    This is similar to number 2 above, except that it places the datastream package on the medium in a device named diskette. pkgtrans(C) prompts for additional volumes if the package requires more than one diskette.

Translating a package instance

When an instance of the package being translated to fixed directory format already exists on device2, pkgtrans(C) does not perform the translation. You can use the -o option to tell pkgtrans to overwrite any existing instances on the destination device and the -n option to tell it to create a new instance if one already exists. Note that the above does not apply when device2 contains a datastream format.

Next topic: Set packaging
Previous topic: Helping pkgmk locate package contents

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005