diff options
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}) { |