diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/install.pm | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,5 @@ - urpmi + o bugfix 4.10.0: a circular reference was causing rpmdb to be opened many times o --urpmi-root: if <root>/etc/urpmi/*.list are available, use them. otherwise defaults to /etc/urpmi/*.list 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++; } |