[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: guix gc: '--delete-generations' now deletes old Home generations.
From: |
guix-commits |
Subject: |
05/07: guix gc: '--delete-generations' now deletes old Home generations. |
Date: |
Sun, 31 Jul 2022 18:06:34 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 4de445f3dae5f5b42d59003cceddecfb296fb73b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jul 31 23:03:36 2022 +0200
guix gc: '--delete-generations' now deletes old Home generations.
This reverts commit 24c0518dd404cbb3c434fb6704f4f551bbc78693,
thereby reinstating ba22560627f848f40891a56355ff26b6de1380bc, with an
additional fix in (guix self).
Fixes <https://issues.guix.gnu.org/56722>.
Reported by "(" <paren@disroot.org>.
* guix/scripts/gc.scm (guix-gc)[delete-generations]: Add call to
'home-generation-base'.
* guix/self.scm (compiled-guix)[*core-cli-modules*]: Remove (guix
scripts gc).
* doc/guix.texi (Invoking guix gc): Document the change.
---
doc/guix.texi | 3 ++-
guix/scripts/gc.scm | 6 ++++--
guix/self.scm | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 12ecc1b952..6e867839a4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4362,7 +4362,8 @@ nothing and exit immediately.
@item --delete-generations[=@var{duration}]
@itemx -d [@var{duration}]
Before starting the garbage collection process, delete all the generations
-older than @var{duration}, for all the user profiles; when run as root, this
+older than @var{duration}, for all the user profiles and home environment
+generations; when run as root, this
applies to all the profiles @emph{of all the users}.
For example, this command deletes all the generations of all your profiles
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 043273f491..65cd4bdf8b 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2012-2013, 2015-2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +26,7 @@
profile-generations
generation-number)
#:autoload (guix scripts package) (delete-generations)
+ #:autoload (gnu home) (home-generation-base)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
@@ -260,7 +261,8 @@ is deprecated; use '-D'~%"))
(filter-map (lambda (root)
(and (or (zero? (getuid))
(user-owned? root))
- (generation-profile root)))
+ (or (generation-profile root)
+ (home-generation-base root))))
(gc-roots)))))
(for-each (lambda (profile)
(delete-old-generations store profile pattern))
diff --git a/guix/self.scm b/guix/self.scm
index d1ccec8a49..fc80e78804 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -929,6 +929,7 @@ itself."
(('guix 'scripts 'deploy) #t)
(('guix 'scripts 'home . _) #t)
(('guix 'scripts 'import . _) #t)
+ (('guix 'scripts 'gc) #t) ;autoloads (gnu home)
(('guix 'pack) #t)
(_ #f))
(scheme-modules* source "guix/scripts"))
- branch master updated (7c1010f326 -> ab59155c5a), guix-commits, 2022/07/31
- 01/07: services: tor: Do not write to /var/log/tor.log., guix-commits, 2022/07/31
- 03/07: gnu: rottlog: Remove input labels., guix-commits, 2022/07/31
- 04/07: home: Add 'home-generation-base'., guix-commits, 2022/07/31
- 02/07: services: rottlog: Keep important /var/log files for 16 weeks., guix-commits, 2022/07/31
- 05/07: guix gc: '--delete-generations' now deletes old Home generations.,
guix-commits <=
- 07/07: gnu: mtd-utils: Disable parallel tests., guix-commits, 2022/07/31
- 06/07: services: rottlog: More convenient default options for <log-rotation>., guix-commits, 2022/07/31