From ff67b6f59bc756214429c0d986203cd5b50aeaf7 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 13 Aug 2007 17:06:12 +0000 Subject: - urpmi o bugfix 4.10.0: a circular reference was causing rpmdb to be opened many times hence "Too many open files" error --- urpm/install.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm') diff --git a/urpm/install.pm b/urpm/install.pm index 596b4098..d5e97707 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -195,6 +195,8 @@ sub install { get_README_files($urpm, $trans, $urpm->{depslist}[$pkgid]); close $fh if defined $fh; }; + #- ensure perl does not create a circular reference below, otherwise all this won't be collected, and rpmdb won't be closed + my ($verbose, $callback_report_uninst) = ($options{verbose}, $options{callback_report_uninst}); $options{callback_uninst} = sub { my ($_urpm, undef, undef, $subtype) = @_; if ($subtype eq 'start') { @@ -205,8 +207,8 @@ sub install { if (member($name, @previous)) { $urpm->{log}("removing upgraded package $fullname"); } else { - $options{callback_report_uninst} and $options{callback_report_uninst}->(N("Removing package %s", $fullname)); - print N("removing package %s", $fullname), "\n" if $options{verbose} >= 0; + $callback_report_uninst and $callback_report_uninst->(N("Removing package %s", $fullname)); + print N("removing package %s", $fullname), "\n" if $verbose >= 0; } $index++; } -- cgit v1.2.1