DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging your software applications

2. Defining a package instance

The same software package can differ by version, architecture, or both. Each variation is known as a ``package instance''. pkgadd(1M)

The only way to install another instance of the same package is to install the new version on top of the old version. The new instance overwrites any files installed by the old instance, installs new files, and may (if the packaging scripts are written to do so) remove files from the system. A pkginfo -l of the package name displays the information from the new package instances pkginfo file. Removing the package removes all files that had been installed by any instance of the package added to the system.

Identifying a package instance

Three parameters defined in the pkginfo(4) file combine to identify each instance uniquely. You should not assign identical values for all three parameters for two instances of the same package installed in the same target environment. These parameters are:


PKG
defines the software package abbreviation and remains constant for every instance of a package

VERSION
defines the software package version

ARCH
defines the software package architecture

For example, you might identify two identical versions of a package that run on different hardware as:

Instance 1 Instance 2
PKG="abbr" PKG="abbr"
VERSION="release 1" VERSION="release 1"
ARCH="MX300I" ARCH="i386"
Two different versions of a package that run on the same hardware might be identified as:

Instance 1 Instance 2
PKG="abbr" PKG="abbr"
VERSION="release 1" VERSION="release 2"
ARCH="i386" ARCH="i386"
All instances of a package installed on a system use the package abbreviation as the instance identifier (PKGINST).


NOTE: pkgmk(1) also assigns an instance identifier to a package as it places it on the installation medium if one or more instances of a package already exists. That identifier bears no relationship to the identifier assigned to the same package on the installation machine.

Accessing the instance identifier in your scripts

Use the PKGINST system parameter to reference your package in your installation scripts.


Next topic: 3. Placing objects into classes
Previous topic: 1. Assigning a package abbreviation

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004