summaryrefslogtreecommitdiff
path: root/lib/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transaction.c')
-rw-r--r--lib/transaction.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/transaction.c b/lib/transaction.c
index d913258bd..7d12eebf2 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -219,6 +219,10 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
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;
}
static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
@@ -238,7 +242,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
for (; dsi->bsize; dsi++) {
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
- if (dsi->bneeded != dsi->obneeded) {
+ if (dsi->bneeded > dsi->obneeded) {
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
dsi->mntPoint, NULL, NULL,
@@ -248,7 +252,7 @@ static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
}
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
- if (dsi->ineeded != dsi->oineeded) {
+ if (dsi->ineeded > dsi->oineeded) {
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
dsi->mntPoint, NULL, NULL,