guix-patches
[Top][All Lists]
Advanced

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

[bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than ab


From: Ludovic Courtès
Subject: [bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than absolute and relative threshold.
Date: Sun, 23 Feb 2020 22:40:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Pierre Neidhardt <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:
>
>> So back to the original patch… I think we should use ‘size->number’ for
>> the absolute threshold.
>>
>> I’m also still mildly reluctant to the addition of
>> ‘GUIX_DISK_SPACE_WARNING_ABSOLUTE’ (one more variable and a weird
>> name—“absolute warning”?).  An option could be to allow
>> ‘GUIX_DISK_SPACE_WARNING’ to optionally contain both thresholds.  These
>> would be valid values:
>>
>>   1GiB;10%
>>   15            ;15% relative, and default absolute
>>   15%           ;same
>>   1G            ;1G absolute, and default relative
>
> The above logic implies that we test against size->number, and if it
> fails then we set the relative threshold.
>
> But a size->number quits Guile.

More precisely, it throws a 'quit exception.  :-)

So you could always do: (false-if-exception (size->number x)).

HTH,
Ludo’.





reply via email to

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