aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-27 15:30:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-27 15:30:38 +0000
commit456ef3de580c076d824d183eba0c03e8a9d4e848 (patch)
treec5fc0f2f121dc7869f31a6ec419907615c6dfcec /URPM.pm
parent3965d631ca4bc7f8843c13784fa0679af33d0c21 (diff)
downloadperl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.gz
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.bz2
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.tar.xz
perl-URPM-456ef3de580c076d824d183eba0c03e8a9d4e848.zip
- handle promotion via obsolete, not only provides
Diffstat (limited to 'URPM.pm')
-rw-r--r--URPM.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/URPM.pm b/URPM.pm
index e2bf32a..11629f9 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -19,6 +19,7 @@ sub new {
my $self = bless {
depslist => [],
provides => {},
+ obsoletes => {},
}, $class;
$self->{nofatal} = 1 if $options{nofatal};
$self;
@@ -31,6 +32,11 @@ sub packages_providing {
map { $urpm->{depslist}[$_] } keys %{$urpm->{provides}{$name} || {}};
}
+sub packages_obsoleting {
+ my ($urpm, $name) = @_;
+ map { $urpm->{depslist}[$_] } keys %{$urpm->{obsoletes}{$name} || {}};
+}
+
sub packages_by_name {
my ($urpm, $name) = @_;
grep { $name eq $_->name } packages_providing($urpm, $name);