SystemInstaller::Package3pm
Interface to packaging for systeminstaller
Usage
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";}
Overview
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.
$pathcontains the location of the package files,$archis the desired image architecture,@pkglistcontains 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.
$imgpathcontains the root directory for the image,$pathcontains 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.
$imgpathcontains the root directory for the image,$pathcontains the location of package files,@filelistcontains 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.
$imgpathcontains the root directory for the image,$pathcontains 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.
$pathcontains the location of the package files.$imgpathis the location of the image and is only available forpost_installandkernelmodes. 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.
Releases
Unchanged in 2 releases since Debian 3.1 (Sarge).