diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-02-28 15:22:32 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-02-28 15:22:32 +0200 |
commit | 0232714ae5409babe522175a7526de4189fead54 (patch) | |
tree | c2a494a63a478c67cc8c257c4f4b7e1b904f386b | |
parent | 96e0472301a9d0388c6fb91cb05ec8864ffba62f (diff) | |
download | librpm-tizen-0232714ae5409babe522175a7526de4189fead54.tar.gz librpm-tizen-0232714ae5409babe522175a7526de4189fead54.tar.bz2 librpm-tizen-0232714ae5409babe522175a7526de4189fead54.zip |
Only consider rpmdb growth for added packages
- Blargh, dumb thinko in previous commit: removed packages wont
necessarily decrease the rpmdb size, but they dont increase it
either.
-rw-r--r-- | lib/transaction.c | 19 |
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); |