aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-28 20:57:29 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-28 20:57:29 +0000
commit894623228a8ed90aeadde862acd28613f1f54e7a (patch)
tree587a7728bbac7bc20d0a51c93d3bf02f74a3c72d /URPM
parent3b7786e94aa98ccc7ffc21de5d277fc3ea007b47 (diff)
downloadperl-URPM-894623228a8ed90aeadde862acd28613f1f54e7a.tar
perl-URPM-894623228a8ed90aeadde862acd28613f1f54e7a.tar.gz
perl-URPM-894623228a8ed90aeadde862acd28613f1f54e7a.tar.bz2
perl-URPM-894623228a8ed90aeadde862acd28613f1f54e7a.tar.xz
perl-URPM-894623228a8ed90aeadde862acd28613f1f54e7a.zip
light speedups
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index f79c438..f8597ba 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -107,7 +107,7 @@ sub find_candidate_packages {
sub get_installed_arch {
my ($db, $n) = @_;
my $arch;
- $db->traverse_tag('name', [ $n ], sub { $arch = $_[0]->arch });
+ $db->traverse_tag_find('name', $n, sub { $arch = $_[0]->arch });
$arch;
}
@@ -156,7 +156,7 @@ sub is_package_installed {
my ($db, $pkg) = @_;
my $found;
- $db->traverse_tag('name', [ $pkg->name ], sub {
+ $db->traverse_tag_find('name', $pkg->name, sub {
my ($p) = @_;
$found ||= $p->fullname eq $pkg->fullname;
});
@@ -167,7 +167,7 @@ sub _is_selected_or_installed {
my ($urpm, $db, $name) = @_;
(grep { $_->flag_available } $urpm->packages_providing($name)) > 0 ||
- $db->traverse_tag('name', [ $name ], undef) > 0;
+ $db->traverse_tag_find('name', $name, sub {}) > 0;
}
#- finds $pkg "provides" that matches $provide_name, and returns the version provided