Reference

SystemInstaller::Package(3pm)

Interface to packaging for SystemInstaller

NAME

SystemInstaller::Package - Interface to packaging for SystemInstaller

SYNOPSIS

 use SystemInstaller::Package;

 $location=     "<package file location>";
 $root=         "<image root location>";
 $arch=         "<image architecture>";            
 @filename=     "<package list filenames>";

 unless (&pkg_install($location,$root,$arch,@filename) {
        printf "install failed\n";
 }

DESCRIPTION

SystemInstaller::Package provides an interface to package installation for SystemInstaller.

ARGUMENTS

$location

The location (directory) that contains the package install files.

$root

The directory that will contain the image.

$arch

The target architecture for the image.

@filename

A list of package list files.

Module API specification

SystemInstaller::Package uses Perl modules to provide the actual functions for specific package types. In order to add support for a new package type the following must be provided in a perl module file named <pkgtype>.pm in the Package subdirectory of the SystemInstaller library. Additionally, the module name must be added to the @PKGMODS array in the Package.pm module. The order of the modules in the array determines the heirarchy. The Rpm module should remain last as the default. Finally, a use statement must be added for the new module in the Package.pm library.

THIS API IS NOT YET FINAL!!! It may (and probably will) change somewhat in the near future.

sub files_find($class,$path,$arch,@pkglist)

Find the best files for the given packages. $path contains the location of the package files, $arch is the desired image architecture, @pkglist contains the names of the desired packages. Returns: list of filenames (without leading directories) or 0 on failure.

sub files_pre_install($class,$imgpath,$path)

Perform any required pre-installation action in the image. $imgpath contains the root directory for the image, $path contains the location of package files. Returns: 1 on success, 0 on failure.

sub files_install($class,$imgpath,$path,@filelist)

Install the package files into the image. $imgpath contains the root directory for the image, $path contains the location of package files, @filelist contains the list of filenames as returned from &files_find. Returns: 1 on success, 0 on failure.

sub files_post_install($class,$imgpath,$path)

Perform any required post-installation action in the image. $imgpath contains the root directory for the image, $path contains the location of package files. Returns: 1 on success, 0 on failure.

sub footprint($class,$mode,$path,$imgpath);

Determine if this modules subroutine for the specific mode should be used. $path contains the location of the package files. $imgpath is the location of the image and is only available for post_install and kernel modes. Returns: 1 if this module's subroutine is to be used, 0 if not.

Valid modes are:

files

Finding the best files to use, the &files_find subroutine.

pre_install

Before the packages are installed, the &files_pre_install subroutine.

install

Installing the packages, the &files_install subroutine.

post_install

After the packages are installed, the &files_post_install subroutine.

AUTHOR

Michael Chase-Salerno <[email protected]>

SEE ALSO

SystemInstaller::Package::Rpm SystemInstaller::Package::Deb SystemInstaller::Package::Suse SystemInstaller::Package::Turbo mksiimage