diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-06-30 17:27:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-06-30 17:27:57 +0000 |
commit | 24558d3592895c919ac75cae6fb83e16bd9397a6 (patch) | |
tree | 873a6f7353a9c94aa652d80c21838d2d47cbccba /rpm-find-leaves | |
parent | a3ef7423c5d8670da2c1c254383d33eb0f3a36e0 (diff) | |
download | urpmi-24558d3592895c919ac75cae6fb83e16bd9397a6.tar urpmi-24558d3592895c919ac75cae6fb83e16bd9397a6.tar.gz urpmi-24558d3592895c919ac75cae6fb83e16bd9397a6.tar.bz2 urpmi-24558d3592895c919ac75cae6fb83e16bd9397a6.tar.xz urpmi-24558d3592895c919ac75cae6fb83e16bd9397a6.zip |
enhance rpm-find-leaves to handle versions in require/provides
Diffstat (limited to 'rpm-find-leaves')
-rw-r--r-- | rpm-find-leaves | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rpm-find-leaves b/rpm-find-leaves index f41c0a26..b257d25f 100644 --- a/rpm-find-leaves +++ b/rpm-find-leaves @@ -53,11 +53,17 @@ my %provides; foreach my $pkg (@packages) { next if $options{restrict_group} && $pkg->group !~ /\Q$options{group}/oi; $l{$pkg->name} = $pkg; - push @{$provides{$_}}, $pkg->name foreach $pkg->provides_nosense; + push @{$provides{$_}}, $pkg foreach $pkg->provides_nosense; } foreach my $pkg (@packages) { - delete @l{grep { $_ ne $pkg->name } @{$provides{$_} || []}} foreach $pkg->requires_nosense; + foreach my $prop ($pkg->requires) { + my ($n, $s) = URPM::property2name_range($prop); + foreach my $p (@{$provides{$n} || []}) { + $p != $pkg && $p->provides_overlap($prop) and + delete $l{$p->name}; + } + } } if ($options{fullname}) { |