diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-05-06 09:22:51 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-05-06 09:22:51 +0000 |
commit | ec5da158151c83d01c297bf229f4d55d3da54032 (patch) | |
tree | c97c7c96f35ffe646691a427e1bedc9808fe56fa /URPM.pm | |
parent | 02416c02cb77fdd6ac3c76edb8a070b5f0a6c527 (diff) | |
download | perl-URPM-ec5da158151c83d01c297bf229f4d55d3da54032.tar perl-URPM-ec5da158151c83d01c297bf229f4d55d3da54032.tar.gz perl-URPM-ec5da158151c83d01c297bf229f4d55d3da54032.tar.bz2 perl-URPM-ec5da158151c83d01c297bf229f4d55d3da54032.tar.xz perl-URPM-ec5da158151c83d01c297bf229f4d55d3da54032.zip |
Add a way to downgrade some errors (file not found) to non-fatal
Diffstat (limited to 'URPM.pm')
-rw-r--r-- | URPM.pm | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -15,15 +15,17 @@ our $VERSION = '0.94'; URPM->bootstrap($VERSION); sub new { - my ($class) = @_; - bless { - depslist => [], - provides => {}, - media => [], - options => {}, - }, $class; + my ($class, %options) = @_; + my $self = bless { + depslist => [], + provides => {}, + }, $class; + $self->{nofatal} = 1 if $options{nofatal}; + $self; } +sub set_nofatal { $_[0]->{nofatal} = $_[1] } + sub search { my ($urpm, $name, %options) = @_; my $best; @@ -205,6 +207,10 @@ C<URPM::Package> objects). B<provides> is an hashref containing as keys the list of items provided by the URPM object. +If the constructor is called with the arguments C<< nofatal => 1 >>, various +fatal error messages are suppressed (file not found in parse_hdlist() and +parse_synthesis()). + =item read_config_files() Force the re-reading of the RPM configuration files. |