- online man pages   

SunOS man pages : pkgtrans (1)

User Commands                                         pkgtrans(1)


pkgtrans - translate package format


pkgtrans [ -inos ] device1 device2 [ pkginst ... ]


pkgtrans translates an installable package from one format to another. It translates: o a file system format to a datastream o a datastream to a file system format o one file system format to another file system format


The options and arguments for this command are: -i Copy only the pkginfo(4) and pkgmap(4) files. -n Create a new instance of the package on the destina- tion device if any instance of this package already exists, up to the number specified by the MAXINST variable in the pkginfo(4) file. -o Overwrite the same instance on the destination device; package instance will be overwritten if it already exists. -s Indicates that the package should be written to dev- ice2 as a datastream rather than as a file system. The default behavior is to write a file system format on devices that support both formats.


device1 Indicates the source device. The package or packages on this device will be translated and placed on dev- ice2. device2 Indicates the destination device. Translated packages will be placed on this device. pkginst Specifies which package instance or instances on dev- ice1 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. SunOS 5.8 Last change: 4 Oct 1996 1 User Commands pkgtrans(1) The asterisk character (*) is a special character to some shells and may need to be escaped. In the C- Shell, "*" must be surrounded by single quotes (') or preceded by a backslash (\).


Example 1: Examples of the pkgtrans command. The following example translates all packages on the floppy drive /dev/diskette and places the translations on /tmp: example% pkgtrans /dev/diskette /tmp all The next example translates packages pkg1 and pkg2 on /tmp and places their translations (that is, a datastream) on the 9track1 output device: example% pkgtrans /tmp 9track1 pkg1 pkg2 The next example translates pkg1 and pkg2 on /tmp and places them on the diskette in a datastream format: example% pkgtrans -s /tmp /dev/diskette pkg1 pkg2


The MAXINST variable is set in the pkginfo(4) file and declares the maximum number of package instances.


0 Successful completion. >0 An error occurred.


See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________|


pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), installf(1M), pkgadd(1M), pkgask(1M), pkgrm(1M), removef(1M), pkginfo(4), pkgmap(4), attributes(5) Application Packaging Developer's Guide SunOS 5.8 Last change: 4 Oct 1996 2 User Commands pkgtrans(1)


Device specifications can be either the special node name (for example, /dev/diskette) or a device alias (for example, diskette1). The device spool indicates the default spool directory. Source and destination devices cannot be the same. By default, pkgtrans will not translate any instance of a package if any instance of that package already exists on the destination device. Using the -n option creates a new instance if an instance of this package already exists. Using the -o option overwrites an instance of this package if it already exists. Neither of these options are useful if the destination device is a datastream. SunOS 5.8 Last change: 4 Oct 1996 3