rpm/rpm-4.9.0-rc1-double-cursor.patch

25 lines
1020 B
Diff

commit 4f7fe5e668e9cd8ba62e700f6f3fdaf2256306d8
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Mon Feb 21 10:55:02 2011 +0200
Fix db cursor double-open, causing yum to hang on reinstall (RhBug:678644)
- A refactoring error in commit 475391dc581bf5ba72b6d59d16d875505b45bd51
causes us to open a double cursor on the Package db. This doesn't
seem to affect much in rpm context, but Yum is being naughty and holding
two different handles to the same db simultaneously, which causes
to deadlock on trying to lock the same record twice from two different
handles .. or something to that effect.
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index dc6d7a7..eb7a49d 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -2331,7 +2331,6 @@ static int updatePackages(dbiIndex dbi, unsigned int hdrNum, DBT *hdr)
DBT data;
memset(&data, 0, sizeof(data));
- xx = dbiCopen(dbi, &dbcursor, DB_WRITECURSOR);
rc = dbiGet(dbi, dbcursor, &key, &data, DB_SET);
if (rc) {
rpmlog(RPMLOG_ERR,