aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-07 17:45:27 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-07 17:45:27 +0000
commit8191d028adfbd8fa457662600e2e4246e51aa414 (patch)
treeb5c8239bb1e0e0ccc69e4802b87088275534983d /Rpmdrake
parent3fc29a60a1c5c2809911c6f9ebb37ad493d5d42c (diff)
downloadrpmdrake-8191d028adfbd8fa457662600e2e4246e51aa414.tar
rpmdrake-8191d028adfbd8fa457662600e2e4246e51aa414.tar.gz
rpmdrake-8191d028adfbd8fa457662600e2e4246e51aa414.tar.bz2
rpmdrake-8191d028adfbd8fa457662600e2e4246e51aa414.tar.xz
rpmdrake-8191d028adfbd8fa457662600e2e4246e51aa414.zip
(get_new_deps) let's open RPM DB only once
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/gui.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 41f14e85..6ac0c766 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -231,11 +231,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;