From patchwork Tue May 26 13:22:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 22383 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CAC3B27BBE3; Tue, 26 May 2020 14:23:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 6BCC027BBE1 for ; Tue, 26 May 2020 14:23:08 +0100 (BST) Received: from localhost ([::1]:59756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdZXv-0001zI-Rb for patchwork@mira.cbaines.net; Tue, 26 May 2020 09:23:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdZXq-0001yy-Vz for guix-patches@gnu.org; Tue, 26 May 2020 09:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdZXq-0004Gy-NF for guix-patches@gnu.org; Tue, 26 May 2020 09:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdZXq-0008Mw-Ih for guix-patches@gnu.org; Tue, 26 May 2020 09:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41538] [PATCH] guix scripts: Mention Guix checkouts + gcroots/auto when warning about disk space. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 May 2020 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41538 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41538@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159049935432120 (code B ref -1); Tue, 26 May 2020 13:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2020 13:22:34 +0000 Received: from localhost ([127.0.0.1]:44415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdZXO-0008M0-1E for submit@debbugs.gnu.org; Tue, 26 May 2020 09:22:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:33652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdZXN-0008Lt-4x for submit@debbugs.gnu.org; Tue, 26 May 2020 09:22:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdZXM-0001tO-VW for guix-patches@gnu.org; Tue, 26 May 2020 09:22:32 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:57973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdZXL-0004E4-FS for guix-patches@gnu.org; Tue, 26 May 2020 09:22:32 -0400 X-Originating-IP: 78.248.96.161 Received: from localhost.localdomain (mqu44-1-78-248-96-161.fbx.proxad.net [78.248.96.161]) (Authenticated sender: mail@ambrevar.xyz) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 7F7F72000F for ; Tue, 26 May 2020 13:22:27 +0000 (UTC) From: Pierre Neidhardt Date: Tue, 26 May 2020 15:22:19 +0200 Message-Id: <20200526132219.27748-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@ambrevar.xyz; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 09:22:28 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/scripts.scm (warn-about-disk-space): Mention Guix checkouts, system profiles and gcroots/auto. --- guix/scripts.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/guix/scripts.scm b/guix/scripts.scm index 3e19e38957..c90c3b840c 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -241,11 +241,23 @@ THRESHOLDS is a pair (ABSOLUTE-THRESHOLD . RELATIVE-THRESHOLD)." absolute-threshold-in-bytes)) (warning (G_ "only ~,1f GiB of free space available on ~a~%") (/ available 1. GiB) (%store-prefix)) - (display-hint (format #f (G_ "Consider deleting old profile -generations and collecting garbage, along these lines: + (if profile + (display-hint (format #f (G_ "Consider deleting old profile +generations, deleting old Guix checkouts and collecting garbage, along these +lines: @example -guix gc --delete-generations=1m -@end example\n")))))) +guix package --profile=~s --delete-generations=1m +guix pull --delete-generations=20d # Guix checkouts +guix system delete-generations=2..9 # System generations +guix gc --free-space=5G +@end example + +You might also want to delete old non-default profiles pointed to by +the symlinks in /var/guix/gcroots/auto (broken symlinks in this +directory will be automatically removed).") + profile)) + (display-hint (G_ "Consider running @command{guix gc} to free +space.")))))) ;;; scripts.scm ends here