summaryrefslogtreecommitdiff
path: root/lib/depends.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/depends.c')
-rw-r--r--lib/depends.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/depends.c b/lib/depends.c
index 2ee7e0de5..e852344d3 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -101,6 +101,10 @@ static int removePackage(rpmts ts, Header h, rpmte depends)
return 0;
}
+ /* Ensure pool is writable */
+ if (tsmem->addedPackages != NULL)
+ rpmstrPoolUnfreeze(tsmem->pool);
+
p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL);
if (p == NULL)
return 1;
@@ -320,6 +324,9 @@ rpmal rpmtsCreateAl(rpmts ts, rpmElementTypes types)
rpmte p;
rpmtsi pi;
+ /* Required for now to lock string pointers in memory */
+ rpmstrPoolFreeze(rpmtsPool(ts));
+
al = rpmalCreate((rpmtsNElements(ts) / 4) + 1, rpmtsFlags(ts),
rpmtsColor(ts), rpmtsPrefColor(ts));
pi = rpmtsiInit(ts);
@@ -356,6 +363,10 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
goto exit;
}
+ /* Ensure pool is writable */
+ if (tsmem->addedPackages != NULL)
+ rpmstrPoolUnfreeze(tsmem->pool);
+
p = rpmteNew(ts, h, TR_ADDED, key, relocs);
if (p == NULL) {
ec = 1;