diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-04-06 14:41:35 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-04-06 14:41:35 +0000 |
commit | bf257bc422b2d2448888fba95cba4ea148aa97f9 (patch) | |
tree | a2c627003ea4feaf89e397f113fe3b3c2752477d /URPM.pm | |
parent | ef428d6cb520165ab91952852563f3a973dce2db (diff) | |
download | perl-URPM-bf257bc422b2d2448888fba95cba4ea148aa97f9.tar perl-URPM-bf257bc422b2d2448888fba95cba4ea148aa97f9.tar.gz perl-URPM-bf257bc422b2d2448888fba95cba4ea148aa97f9.tar.bz2 perl-URPM-bf257bc422b2d2448888fba95cba4ea148aa97f9.tar.xz perl-URPM-bf257bc422b2d2448888fba95cba4ea148aa97f9.zip |
Deprecate the pseudo-packages URPM::Build, URPM::Resolve and URPM::Signature.
Documentation fixes. Tidy up the tests (and add a few ones.)
Diffstat (limited to 'URPM.pm')
-rw-r--r-- | URPM.pm | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -3,6 +3,12 @@ package URPM; use strict; use DynaLoader; +# different files, but same package +# require them here to avoid dependencies +use URPM::Build; +use URPM::Resolve; +use URPM::Signature; + our @ISA = qw(DynaLoader); our $VERSION = '0.94'; @@ -172,7 +178,7 @@ URPM - Perl module to manipulate RPM files # loading and parsing a synthesis file my $urpm = new URPM; $urpm->parse_synthesis("synthesis.sample.cz"); - $a->traverse(sub { + $urpm->traverse(sub { # retrieve all packages from the dependency list # ... }); @@ -238,6 +244,28 @@ and adds them to the URPM object. Allowed options are keep_all_tags => 0 / 1 callback => sub { ... } +=item $urpm->search($name, %options) + +Search an RPM by name or by part of name in the list of RPMs represented by +this $urpm. The behaviour of the search is influenced by several options: + + strict_name => 0 / 1 + strict_fullname => 0 / 1 + src => 0 / 1 + +=item $urpm->traverse($callback) + +Executes the callback for each package in the depslist, passing a +C<URPM::Package> object as argument the callback. + +=item $urpm->traverse_tag($tag, $names, $callback) + +$tag may be one of C<name>, C<whatprovides>, C<whatrequires>, C<whatconflicts>, +C<group>, C<triggeredby>, or C<path>. +$names is a reference to an array, holding the acceptable values of the said +tag for the searched variables. +Then, $callback is called for each matching package in the depslist. + =item $urpm->verify_rpm($file, %options) Verifies an RPM file. @@ -327,7 +355,7 @@ of an RPM package. =item $package->compare($evr) -=item $package->compare_pkg($lpkg, $rpkg) +=item $package->compare_pkg($other_pkg) =item $package->conf_files() @@ -391,6 +419,8 @@ of an RPM package. =item $package->fullname() +Returns a 4 element list: name, version, release and architecture. + =item $package->get_tag($tagname) =item $package->get_tag_modifiers($tagname) |