summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/transaction.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/transaction.c b/lib/transaction.c
index 9ceb81238..68461d486 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1315,17 +1315,18 @@ static int rpmtsPrepare(rpmts ts)
needs on each partition for this package. */
handleOverlappedFiles(ts, ht, p, fi);
- /*
- * Try to estimate space needed for rpmdb growth: guess that the
- * db grows 4 times the header size (indexes and all).
- */
- if (dbhome) {
- int64_t hsize = rpmteHeaderSize(p) * 4;
- rpmtsUpdateDSI(ts, dbstat.st_dev, dbhome, hsize, 0, 0, FA_CREATE);
- }
-
/* Check added package has sufficient space on each partition used. */
if (rpmteType(p) == TR_ADDED) {
+ /*
+ * Try to estimate space needed for rpmdb growth: guess that the
+ * db grows 4 times the header size (indexes and all).
+ */
+ if (dbhome) {
+ int64_t hsize = rpmteHeaderSize(p) * 4;
+ rpmtsUpdateDSI(ts, dbstat.st_dev, dbhome,
+ hsize, 0, 0, FA_CREATE);
+ }
+
rpmtsCheckDSIProblems(ts, p);
}
(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);