[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

pkgtrans Command

Purpose

Translates package format.

Syntax

pkgtrans [ -i -o -n -s] [ -z Blocksize] Device1 Device2 [ Pkginst1 [ Pkginst2 [...]]]

Description

The pkgtrans command translates an installable package from one format to another. It translates the following:

You cannot run pkgtrans from csh.

Flags

-i Copies the pkginfo and Pkgmap files. If the packages category is defined as "set" for Set Installation Packages (SIPs) (see setinfo file format), then that packages' setinfo file is also copied.
-o Overwrites the same instance on the destination device. The package instance is overwritten if it already exists.
-n Creates a new instance of the package on the destination device. If the package instance already exists on the destination device, it is left unchanged and a new instance is created. The new instance has a sequence number attached to distinguish it from the existing instance. For example, assume the destination device already contained an instance of package X. If you use pkgtrans with the -n flag to write a new instance of package X to the device, the existing instance of package X remains on the destination device, and a new instance, called X.2, would be created on the device. If you executed pkgtrans again with the -n flag, a third instance, called X.3, would be created.
-s Indicates that the package should be written to Device2 as a datastream rather than as a file system. The default behavior is to write to Device2 in the file system format.
-z Blocksize Indicates the blocksize to be used when transferring to cartridge tape. Packages that have been written to tape using the -z flag and a value not equal to 512 are always read using a blocksize of 32768. Thus, the -z flag is not applicable when reading from cartridge tape.
Device1 Indicates the source device. Can be - (hyphen) which specifies packages in datastream format read from standard input. The package or packages on this device are translated and placed on Device2. If Device1 is a regular file or directory, you must use the absolute pathname, rather than a relative pathname.
Device2 Indicates the destination device. Can be - (hyphen) which specifies packages written to standard output in datastream format. Translated packages are placed on this device. If Device2 is a regular file or directory, you must specify it as an absolute pathname, rather than a relative pathname.
Pkginst Specifies which package on Device1 should be translated. The token "all" may be used to indicate all packages. Pkginst.* can be used to indicate all instances of a package. If no packages are defined, a prompt shows all packages on the device and asks which to translate. If a set is being transferred to datastream format, the Pkginst arguments should begin with the SIP and be followed by the packages listed in the SIP's setinfo file, in the order in which they appear in that file.
Note
By default, pkgtrans does not transfer any instance of a package if any instance of that package already exists on the destination device. Use of the -n flag creates a new instance if an instance of this package already exists. Use of the -o flag overwrites the same instance if it already exists. Neither of these flags are useful if the destination device is a datastream, because the entire datastream is overwritten anyway.

Exit Status

This command returns the following exit values:

0 Successful completion of script.
1 Fatal error. Installation process is terminated at this point.

Files

/usr/sbin/pkgtrans Contains the pkgtrans command.

Examples

  1. To translate all packages located on drive Device and place the translations in /tmp, type:

    pkgtrans Device /tmp all
  2. To translate "pkg1" and "pkg2" in tmp and place them on Device in a datastream format, type:

    pkgtrans -s /tmp Device pkg1 pkg2

Related Information

The pkgadd command, pkgask command, pkginfo command, pkgmk command, pkgparam command, pkgrm command.

The pkginfo File Format.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]