Account for temporary disk-space requirement on forced replace too
- Similar to commit 85df102165
, but
for forced file replacements.
This commit is contained in:
parent
f8da4f6136
commit
b1d3f21a54
|
@ -212,6 +212,11 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
|
||||||
dsi->bdelta += BLOCK_ROUND(prevSize, dsi->bsize);
|
dsi->bdelta += BLOCK_ROUND(prevSize, dsi->bsize);
|
||||||
dsi->idelta++;
|
dsi->idelta++;
|
||||||
}
|
}
|
||||||
|
if (fixupSize) {
|
||||||
|
dsi->bdelta += BLOCK_ROUND(fixupSize, dsi->bsize);
|
||||||
|
dsi->idelta++;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FA_ERASE:
|
case FA_ERASE:
|
||||||
|
@ -223,9 +228,6 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fixupSize)
|
|
||||||
dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize);
|
|
||||||
|
|
||||||
/* adjust bookkeeping when requirements shrink */
|
/* adjust bookkeeping when requirements shrink */
|
||||||
if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded;
|
if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded;
|
||||||
if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded;
|
if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded;
|
||||||
|
|
Loading…
Reference in New Issue