DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

pkgtrans(C)


pkgtrans -- translate package format

Synopsis

/usr/bin/pkgtrans [-ions] [-z blocksize] device1 device2 [pkginst1 [pkginst2 [...]]]

Description

pkgtrans translates an installable package from one format to another. It translates:

For removable file system media, pkgtrans will optionally allow the user to format and place a file system on the media, and write a label on the media before transferring the package to the media.

The options and arguments for this command are:


-i
Copies the pkginfo(F) and pkgmap(F) files. If the package's category is defined as set, for Set Installation Packages (SIPs) as described on setinfo(F), then that package's setinfo file is also copied.

-o
Overwrites the same instance on the destination device. The package instance will be 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 will be left unchanged and a new instance will be created. The new instance will have 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 option to write a new instance of package X to the device, the existing instance of package X will remain 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 option, 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 option and a value not equal to 512 are always read using a blocksize of 32768. Thus, the -z option is not applicable when reading from cartridge tape.

device1
Indicates the source device. Can be ``"-"'' which specifies package(s) in datastream format read from standard input. The package or packages on this device will be 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 ``"-"'' which specifies package(s)written to standard output in datastream format. Translated packages will be 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.

Exit codes


0
Successful completion of script.

1
Fatal error. Installation process is terminated at this point.

Differences between versions

For SCO OpenServer Release 5.0.5a and later releases, this command is identical to the UnixWare 7 command of the same name. For earlier SCO OpenServer releases, the -z option and the ``"-"'' value for the device1 and device2 arguments are not supported.

Files


/etc/device.tab

/usr/lib/locale/locale/LC_MESSAGES/uxpkg
language-specific message file; see LANG on environ(M).

Examples

The following example translates all packages located on drive device and places the translations on /tmp.
   pkgtrans device /tmp all

The next example translates packages pkg1 and pkg2 located on /tmp and places their translations on diskette1 in file system format.

   pkgtrans /tmp diskette1 pkg1 pkg2

The next example translates pkg1 and pkg2 on tmp and places them on device in a datastream format.

   pkgtrans -s /tmp device pkg1 pkg2

References

installf(ADM), pkgadd(ADM), pkgask(ADM), pkginfo(C), pkginfo(F), pkgmk(C), pkgparam(C), pkgproto(C), pkgrm(ADM), removef(ADM)

Notices

You cannot run pkgtrans from csh (see csh(C)).

Device specifications can be either the special node name (/dev/diskette) or the device alias (diskette1). The device spool indicates the default spool directory. Source and destination devices may not be the same. Regular files and directories must be specified by their absolute pathname, rather than a relative pathname.

By default, pkgtrans will not transfer any instance of a package if any instance of that package already exists on the destination device. Use of the -n option will create a new instance if an instance of this package already exists. Use of the -o option will overwrite the same instance if it already exists. Neither of these options are useful if the destination device is a datastream, since the entire datastream is overwritten anyway.

When creating file system format package instances on removable media, pkgtrans will optionally allow you to format the media and create a file system on it. The file system type used and the file system size will depend on the attributes defined for the device in /etc/device.tab.

pkgtrans depends on the integrity of the /etc/device.tab file to determine whether a device can support a datastream and/or file system formats. Problems in transferring a device in a particular format could mean corruption of /etc/device.tab.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003