diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-11-14 12:19:49 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-11-14 12:38:20 +0200 |
commit | afaf0a1166274c5b604bbe706613db87d379bb63 (patch) | |
tree | d13a852cde83838ff4277df8b88dbabbeae62656 /lib | |
parent | 3827fb81517a96073be693cfb405d145304ff4a2 (diff) | |
download | librpm-tizen-afaf0a1166274c5b604bbe706613db87d379bb63.tar.gz librpm-tizen-afaf0a1166274c5b604bbe706613db87d379bb63.tar.bz2 librpm-tizen-afaf0a1166274c5b604bbe706613db87d379bb63.zip |
Account for temporary disk-space requirement on forced replace too
- Similar to commit 85df102165fdbe64978f2019d757d400e7448218, but
for forced file replacements.
(cherry picked from commit b1d3f21a54eb1f23a08e9e2d943a6438502b0e47)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transaction.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; |