Root reserved fs blocks adjustment should be 1.05 (not 1/0.95).
authorjbj <devnull@localhost>
Sun, 18 Apr 1999 20:56:19 +0000 (20:56 +0000)
committerjbj <devnull@localhost>
Sun, 18 Apr 1999 20:56:19 +0000 (20:56 +0000)
CVS patchset: 3015
CVS date: 1999/04/18 20:56:19

lib/transaction.c
po/rpm.pot

index b2aec3a..37b2c64 100644 (file)
@@ -58,6 +58,9 @@ struct diskspaceInfo {
     signed long avail;
 };
 
+/* Adjust for root only reserved space. On linux e2fs, this is 5%. */
+#define        adj_fs_blocks(_nb)      (((_nb) * 21) / 20)
+
 /* argon thought a shift optimization here was a waste of time...  he's 
    probably right :-( */
 #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))
@@ -464,10 +467,10 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
 
        if (di && fi->type == TR_ADDED && fi->fc) {
            for (i = 0; i < filesystemCount; i++) {
-               if (((di[i].needed * 20) / 19)> di[i].avail) {
+               if (adj_fs_blocks(di[i].needed) > di[i].avail) {
                    psAppend(probs, RPMPROB_DISKSPACE, fi->ap->key, fi->ap->h,
                             filesystems[i], NULL, 
-                            (((di[i].needed * 20) / 19) - di[i].avail) *
+                            (adj_fs_blocks(di[i].needed) - di[i].avail) *
                                di[i].block);
                }
            }
index 5a7df65..2600108 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-04-17 10:16-0400\n"
+"POT-Creation-Date: 1999-04-18 15:08-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3206,17 +3206,17 @@ msgstr ""
 msgid "Invalid %%_signature spec in macro file"
 msgstr ""
 
-#: ../lib/transaction.c:789
+#: ../lib/transaction.c:790
 #, c-format
 msgid "relocating %s to %s\n"
 msgstr ""
 
-#: ../lib/transaction.c:795
+#: ../lib/transaction.c:796
 #, c-format
 msgid "excluding %s\n"
 msgstr ""
 
-#: ../lib/transaction.c:883
+#: ../lib/transaction.c:884
 #, c-format
 msgid "%s skipped due to missingok flag\n"
 msgstr ""