From 6d2c5e8b142344fb51ab4d7adc8412deceaeab33 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 17 Dec 2002 13:57:31 +0000 Subject: added very faster code, 3 times faster on traverse_tag with --env. --- URPM.pm | 4 ++-- perl-URPM.spec | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/URPM.pm b/URPM.pm index 4e3b90f..c7c6c09 100644 --- a/URPM.pm +++ b/URPM.pm @@ -100,14 +100,14 @@ sub traverse_tag { @names{@$names} = (); if ($tag eq 'whatrequires') { foreach (@{$urpm->{depslist} || []}) { - if (grep { /^([^ \[]*)/ && exists $names{$1} } $_->requires) { + if (grep { exists $names{$_} } $_->requires_nosense) { $callback and $callback->($_); ++$count; } } } elsif ($tag eq 'whatconflicts') { foreach (@{$urpm->{depslist} || []}) { - if (grep { /^([^ \[]*)/ && exists $names{$1} } $_->conflicts) { + if (grep { exists $names{$_} } $_->conflicts_nosense) { $callback and $callback->($_); ++$count; } diff --git a/perl-URPM.spec b/perl-URPM.spec index 7b2ecc2..a3f9b76 100644 --- a/perl-URPM.spec +++ b/perl-URPM.spec @@ -50,7 +50,9 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 17 2002 François Pons 0.81-1mdk -- little improve on traverse_tag with tag name when env. +- little improve on traverse_tag with tag name whit --env. +- big improve on traverse_tag with tag whatrequires and + whatconflicts with --env. - fixed dependencies resolution when various different version of a package are available. -- cgit v1.2.1