diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-21 16:16:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-21 16:16:17 +0000 |
commit | 6672829d3986869cf6816a680def1052b9eb4c86 (patch) | |
tree | bbd8e69a8d5237bdbb927a2347fdba859e378552 | |
parent | 1fc0f1af3e7056ce5f860b237f5d846caa6b586d (diff) | |
download | rpmdrake-6672829d3986869cf6816a680def1052b9eb4c86.tar rpmdrake-6672829d3986869cf6816a680def1052b9eb4c86.tar.gz rpmdrake-6672829d3986869cf6816a680def1052b9eb4c86.tar.bz2 rpmdrake-6672829d3986869cf6816a680def1052b9eb4c86.tar.xz rpmdrake-6672829d3986869cf6816a680def1052b9eb4c86.zip |
(get_new_deps) let's open RPM DB only once
(backported from trunk)
-rw-r--r-- | Rpmdrake/gui.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index f5c3677b..7178614f 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -230,11 +230,13 @@ sub get_new_deps { activate => sub { slow_func($::main_window->window, sub { my $state = {}; + my $db = open_rpm_db(); my @requested = $urpm->resolve_requested( - open_rpm_db(), $state, + $db, $state, { $upkg->id => 1 }, ); - $urpm->disable_selected(open_rpm_db(), $state, @requested); + $urpm->disable_selected($db, $state, @requested); + undef $db; my @nodes_with_deps = map { urpm_name($_) } @requested; my @deps = sort { $a cmp $b } difference2(\@nodes_with_deps, [ urpm_name($upkg) ]); @deps = N("No non installed dependency.") if !@deps; |