summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-13 17:06:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-13 17:06:12 +0000
commitff67b6f59bc756214429c0d986203cd5b50aeaf7 (patch)
treecf4712f95b55721c55239faed605aa6ebb2c1cee
parent4d5a1da07d318b058a25f5bc38174fcdc456b50f (diff)
downloadurpmi-ff67b6f59bc756214429c0d986203cd5b50aeaf7.tar
urpmi-ff67b6f59bc756214429c0d986203cd5b50aeaf7.tar.gz
urpmi-ff67b6f59bc756214429c0d986203cd5b50aeaf7.tar.bz2
urpmi-ff67b6f59bc756214429c0d986203cd5b50aeaf7.tar.xz
urpmi-ff67b6f59bc756214429c0d986203cd5b50aeaf7.zip
- urpmi
o bugfix 4.10.0: a circular reference was causing rpmdb to be opened many times hence "Too many open files" error
-rw-r--r--NEWS1
-rw-r--r--urpm/install.pm6
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 5d8207a6..eab9d7da 100644
--- a/NEWS
+++ b/NEWS
@@ -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++;
}