guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: scripts: Show disk-space warning when under the m


From: guix-commits
Subject: branch master updated: scripts: Show disk-space warning when under the min of the thresholds.
Date: Fri, 06 Mar 2020 02:32:22 -0500

This is an automated email from the git hooks/post-receive script.

ambrevar pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 1d24cc6  scripts: Show disk-space warning when under the min of the 
thresholds.
1d24cc6 is described below

commit 1d24cc6de674ff8cd6321eb373ab86c8028e2281
Author: Pierre Neidhardt <address@hidden>
AuthorDate: Fri Mar 6 08:29:09 2020 +0100

    scripts: Show disk-space warning when under the min of the thresholds.
    
    Follow-up to 71c3c3df92375ca9b4bd28b2be90dda67288fa5c which got the logic
    wrong.
    
    * guix/scripts.scm (warn-about-disk-space): Compare AVAILABLE to the min of
    RELATIVE-THRESHOLD-IN-BYTES and ABSOLUTE-THRESHOLD-IN-BYTES, not the max.
---
 guix/scripts.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts.scm b/guix/scripts.scm
index e235c8d..3e19e38 100644
--- a/guix/scripts.scm
+++ b/guix/scripts.scm
@@ -237,7 +237,7 @@ THRESHOLDS is a pair (ABSOLUTE-THRESHOLD . 
RELATIVE-THRESHOLD)."
          (total      (* block-size (file-system-block-count stats)))
          (relative-threshold-in-bytes (* total (cadr thresholds)))
          (absolute-threshold-in-bytes (car thresholds)))
-    (when (< available (max relative-threshold-in-bytes
+    (when (< available (min relative-threshold-in-bytes
                             absolute-threshold-in-bytes))
       (warning (G_ "only ~,1f GiB of free space available on ~a~%")
                (/ available 1. GiB) (%store-prefix))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]