summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20120305/631d4318/attachment-0001.obj
blob: 9e8646588e8510a9af0fe5f71aff36391f40c665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
commit d66ae590be88c1e5e47088dcd250b7f9b9b4a8dc
Author: Dousig <thierry.vignaud@gmail.com>
Date:   Mon Mar 5 15:31:53 2012 +0100

    (install) fix circular reference that defeats perl's GC
    
    else we keep the RPM DB open several times until rpm fails:
    
    created transaction for installing on / (remove=0, install=0, upgrade=8)
    error: rpmdb: Lock table is out of available locker entries
    error: cannot open Basenames index using db4 - Cannot allocate memory (12)
    error: rpmdb: Lock table is out of available locker entries
    error: cannot open Group index using db4 - Cannot allocate memory (12)
    error: rpmdb: Lock table is out of available locker entries
    error: cannot open Requirename index using db4 - Cannot allocate memory (12)
    error: rpmdb: Lock table is out of available locker entries
    error: cannot open Triggername index using db4 - Cannot allocate memory (12)
    error: rpmdb: Lock table is out of available locker entries
    (...)
    
    regression introduced in commit r2946 on 2012-02-14
    (was: '(install) --test: do not display "More information on package"')

diff --git a/NEWS b/NEWS
index 50b0dba..dfbc36d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
 - explicitely close the RPM DB after each transaction
+- fix circular dependency that defeats perl's GC
 - warn if --allow-force, --allow-nodeps, --force or --keep is in use (mga#3127)
 
 Version 6.45 - 27 February 2012
diff --git a/urpm/install.pm b/urpm/install.pm
index fc30b84..3dd9730 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -222,6 +222,7 @@ sub install {
 	$urpm->{readmes} = {};
 	my $index;
 	my $fh;
+	my $is_test = $options{test}; # fix circular reference
 	#- assume default value for some parameter.
 	$options{delta} ||= 1000;
 
@@ -239,7 +240,7 @@ sub install {
 	    my ($urpm, undef, $pkgid) = @_;
 	    return unless defined $pkgid;
 	    $callback_close_helper and $callback_close_helper->($db, @_);
-	    get_README_files($urpm, $trans, $urpm->{depslist}[$pkgid]) if !$options{test};
+	    get_README_files($urpm, $trans, $urpm->{depslist}[$pkgid]) if !$is_test;
 	    close $fh if defined $fh;
 	};
 	#- ensure perl does not create a circular reference below, otherwise all this won't be collected,