blob: d6f43a2c060f803d95668ea5a69cb4365786b0bb (
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
|
Increase the maximum number of solver databases!
Previously the max was set to 5, up this to 20... this should be more
then enough for now.. also add an RPM_ERROR message in case we exceed the
new maximum.
Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff -urN rpm-5.4.0.orig/rpmio/rpmbag.c rpm-5.4.0/rpmio/rpmbag.c
--- rpm-5.4.0.orig/rpmio/rpmbag.c 2010-10-17 21:43:55.000000000 -0500
+++ rpm-5.4.0/rpmio/rpmbag.c 2011-02-18 18:46:00.246892502 -0600
@@ -16,7 +16,7 @@
/*@unchecked@*/
int _rpmbag_debug = 0;
-static size_t _maxnsdbp = 5;
+static size_t _maxnsdbp = 20;
static void rpmbagFini(void * _bag)
/*@globals fileSystem @*/
@@ -70,6 +70,8 @@
sdbp[i] = xcalloc(1, sizeof(*sdbp[i]));
sdbp[i]->dbmode = dbmode;
sdbp[i]->_db = _db;
+ } else if (bag && bag->sdbp && bag->nsdbp >= _maxnsdbp) {
+ rpmlog(RPMLOG_ERR, _("Attempted to open more then %d solver databases. Increase _maxnsdbp in rpmio/rpmbag.c\n"), _maxnsdbp);
}
return 0;
|