make_pkg_db.1 revision a970c705050f9e90c4b6d7982a9b3211719353fb
t

CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License, Version 1.0 only
(the "License"). You may not use this file except in compliance
with the License.

You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END


Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

MAKE_PKG_DB 1 "Nov 2, 2000"
"NAME"
make_pkg_db - create a Perl DBM database of installed software
"SYNOPSIS"

make_pkg_db -dbdir dbm_database_pathname [-h]
 [-ifiles filename...]
 [-pkgdef package_pool_pathname]
"DESCRIPTION"

The make_pkg_db command (a Perl script) generates a Perl DBM database of software installed on a system based on /var/sadm/install/contents or the contents of a package pool directory. The Perl DBM database files are used by get_depend_info(1).

The Perl DBM database files contain information keyed on a file name. Some files, for example, list the package in which a file is included and the permissions of the file.

If you run make_pkg_db -dbdir dbm_database_pathname, an error message such as:

***CANNOT RESOLVE ABSOLUTE PATH /usr/java/bin/appletviewer

is generated because the script cannot resolve symbolic links based on the information in /var/sadm/install/contents. In /var/sadm/install/contents, for example, appletviewer is specified as a symbolic link:

/usr/bin/appletviewer=../java/bin/appletviewer s none SUNWj2dev

Unfortunately, /usr/java is a symbolic link to /usr/java1.2. The correct file entry in /var/sadm/install/contents is therefore /usr/java1.2/bin/appletviewer. It is impossible for this script to resolve this link based on the information in /var/sadm/install/contents.

To correct this problem, create a file named MyLinkResolution and add this entry:

/usr/bin/appletviewer=../java1.2/bin/appletviewer s none SUNWj2dev

Then enter this command:

make_pkg_db -dbdir dbm_database_pathname -ifiles MyLinkResolution
When you execute this command, the following message is displayed:
...OVERRIDDEN: /usr/bin/appletviewer=
../java/bin/appletviewer s none SUNWj2dev

This message indicates that the original entry in /var/sadm/install/contents is ignored and your new entry in MyLinkResolution is used instead.

SampleLinks is a file you can use to resolve links in /var/sadm/install/contents for Solaris (Intel Platform Edition). SamplePkgLinks is a file you can use to resolve some of the links used on the Solaris 8 Software 1 of 2 Intel Platform Edition CD. You might want to modify these two preceding files for SPARC or for your particular environment.

The make_pkg_db script verifies the files it finds against the software that is actually installed on the system. The more complete the information, the more accurate the output of the script.

"OPTIONS"

The following options are supported: -dbdir Specifies the directory in which you want to place the output Perl DBM databases. -h Displays help. -ifiles Specifies the name of an input file you want to use to help in resolving symbolic links. -pkgdef Specifies the path name of the package pool you want to use instead of /var/sadm/install/contents.

"OPERANDS"

The following operands are supported: dbm_database_pathname Specifies the directory in which you want to place the output Perl DBM databases. filename Specifies the name of a file or files that contain data in the format used in /var/sadm/install/contents. package_pool_pathname Specifies the path name of the package pool you want to use instead of /var/sadm/install/contents.

"ATTRIBUTES"

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Availability SUNWonbld
CSI Enabled
Interface Stability Evolving
MT-Level Unsafe
"SEE ALSO"

get_depend_info(1), attributes(5)

"NOTES"

DBM database files are platform dependent. DBM database files you generate on a SPARC machine, for example, do not work on an IA machine (and vice-versa).

This script might not resolve all symbolic links.