From afaf0a1166274c5b604bbe706613db87d379bb63 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 14 Nov 2012 12:19:49 +0200 Subject: Account for temporary disk-space requirement on forced replace too - Similar to commit 85df102165fdbe64978f2019d757d400e7448218, but for forced file replacements. (cherry picked from commit b1d3f21a54eb1f23a08e9e2d943a6438502b0e47) --- lib/transaction.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/transaction.c b/lib/transaction.c index 0564df34c..31c847eb8 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -210,6 +210,11 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, dsi->bdelta += BLOCK_ROUND(prevSize, dsi->bsize); dsi->idelta++; } + if (fixupSize) { + dsi->bdelta += BLOCK_ROUND(fixupSize, dsi->bsize); + dsi->idelta++; + } + break; case FA_ERASE: @@ -221,9 +226,6 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, break; } - if (fixupSize) - dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); - /* adjust bookkeeping when requirements shrink */ if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded; if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded; -- cgit v1.2.3