AIX-LPP
view release on metacpan or search on metacpan
LPP/lpp_name.pm view on Meta::CPAN
COMMENTS => '');
my @reqs = [ ['*prereq','bos.rte','4.3.3.0'] ];
$x->requisites('test.lpp.rte', \@reqs);
my %sizes = { '/usr' => '5', '/etc' => '1' };
$x->sizeinfo('test.lpp.rte', \%sizes);
$x->write(\*out_fh);
or
$x = lpp_name->read(\*in_fh);
my %lppdata = $x->lpp();
my %fsdata = $x->fileset('test.lpp.rte');
my $req_ref = $x->requisites('test.lpp.rte');
my $size_ref = $x->sizeinfo('test.lpp.rte');
=head1 DESCRIPTION
AIX::LPP::lpp_name is a class module for reading, creating, and modifying
AIX lpp_name files. The lpp_name file is an internal component of AIX
packages (called LPPs). LPPs consist of filesets and information about
installing them. This information can include: prerequisites, filesystem
requirements, copywrites, etc..
LPP/lpp_name.pm view on Meta::CPAN
=over 4
=item $x = lpp_name->new();
The simple form of the new constructor method creates an empty lpp_name
object. This object is then modified using lpp() and fileset() object
methods. Basic LPP information can also be passed to new() as follows: ...
=item $x = lpp_name->read(\*in_fh);
Alternatively, a new lpp_name object can be create by reading data from
an lpp_name formatted file. read() is both a class method and an instance
method (or it will be when I'm finished).
=head1 OBJECT METHODS
=over 4
=item lpp()
=item fileset()
Changes
LPP/lpp_name.pm
MANIFEST
Makefile.PL
README
TODO
data/lpp_name
scripts/mkcontrol
t/0.t
t/1.t
t/2.t
t/3.t
COMMENTS => '');
my @reqs = [ ['*prereq','bos.rte','4.3.3.0'] ];
$x->requisites('test.lpp.rte', \@reqs);
my %sizes = { '/usr' => '5', '/etc' => '1' };
$x->sizeinfo('test.lpp.rte', \%sizes);
$x->write(\*out_fh);
or
$x = lpp_name->read(\*in_fh);
my %lppdata = $x->lpp();
my %fsdata = $x->fileset('test.lpp.rte');
my $req_ref = $x->requisites('test.lpp.rte');
my $size_ref = $x->sizeinfo('test.lpp.rte');
Read the installp manpage and the IBM LPP package format documentation
for more detail. The use maintained lppbuild package is also a good
source of documentation.
Support questions and suggestions can be directed to critter@aixadm.org
improve the parsing routine to handle multiple filesets per package
add validation()
add defaults() ?
add object classes for handling other package data: post_i, odmadd,
copywrite, etc.
add methods to store/query *installed* package info
scripts/mkcontrol view on Meta::CPAN
# (note: only creates limited 'control' file)
#
# usage: mkcontrol < lpp_name > control
use AIX::LPP::lpp_name;
# change this to use stdin/stdout
$package = AIX::LPP::lpp_name->read(\*STDIN);
# instead of calling write(), find the data we want and print it to stdout
my ($name,$version,$type,$four,$fs) = $package->lpp();
my ($fsname,$vrmf,$disk,$bboot,$cntnt,$lang,$desc,$cmnt) =
$package->fileset($fs);
print 'NAME=',"$fsname\n";
print 'VERSION=',"$vrmf\n";
print 'DESCRIPTION=',"$desc\n";
use AIX::LPP::lpp_name;
print "1..1\n";
open(LPP_NAME,">data/lpp_test.2") or die "Can't open file lpp_name: $!";
$package = AIX::LPP::lpp_name->new(NAME => 'test.lpp',TYPE => 'I',
FORMAT => '4', PLATFORM => 'R');
$package->fileset('test.lpp.rte', VRMF => '01.01.0000.0000',DISK => '01',
BOSBOOT => 'N',CONTENT => 'U', LANG => 'en_US',
DESCRIPTION => 'test package description' );
# $package->requisites();
# $package->sizeinfo();
$package->write(\*LPP_NAME);
use AIX::LPP::lpp_name;
print "1..1\n";
open(INLPP,"<data/lpp_name") or die "Can't open file lpp_name: $!";
open(OUTLPP,">data/lpp_test.3") or die "Can't open file lpp_name: $!";
$package = AIX::LPP::lpp_name->read(\*INLPP);
$package->write(\*OUTLPP);
print "ok 1\n";
( run in 0.428 second using v1.01-cache-2.11-cpan-8d75d55dd25 )