From b6c794362aa9b3b2552f32bd13775a127febc17d Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 12 Sep 2012 20:11:00 +0300 Subject: Whoopsie, unbreak checking of installed dependencies - The dependency sets created from installed headers during rpmtsCheck() were using a private pool and thus ids not matching with the ones in the global pool. Oops. Somehow none of our test-suite cases caught this, looks like we'll need more tests... Also the safe-guard assert()'s are in all the wrong places for catching this particular problem. Doh :) - There's a chicken-and-egg situation involved: in order to do this, the global pool needs to be in unfrozen state during rpmtsCheck(), which was not possible before switching rpmal provides (and files) to pool ids. Now that it *is* using pool id's, move the freeze-point to rpmtsPrepare() as the fingerprinting has similar issues with moving strings. --- lib/transaction.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/transaction.c') diff --git a/lib/transaction.c b/lib/transaction.c index 624077786..affc890d3 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1357,6 +1357,9 @@ static int rpmtsPrepare(rpmts ts) const char *dbhome = NULL; struct stat dbstat; + /* Required for now to lock string pointers in memory */ + rpmstrPoolFreeze(tsmem->pool, 1); + fingerPrintCache fpc = fpCacheCreate(fileCount/2 + 10001); rpmFpHash ht = rpmFpHashCreate(fileCount/2+1, fpHashFunction, fpEqual, NULL, NULL); -- cgit v1.2.3