[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/15: guix gc: '--delete-generations' now deletes old Home generations.
From: |
guix-commits |
Subject: |
03/15: guix gc: '--delete-generations' now deletes old Home generations. |
Date: |
Fri, 22 Jul 2022 18:40:50 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ba22560627f848f40891a56355ff26b6de1380bc
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jul 17 17:15:02 2022 +0200
guix gc: '--delete-generations' now deletes old Home generations.
Previously, 'guix gc -d4m' would ignore Home generations. With this
change, they are treated like profiles and generations that match the
pattern are deleted.
* guix/scripts/gc.scm (guix-gc)[delete-generations]: Add call to
'home-generation-base'.
* doc/guix.texi (Invoking guix gc): Document the change.
---
doc/guix.texi | 3 ++-
guix/scripts/gc.scm | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3c5864ec1a..cdecdf5b82 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))
- branch master updated (c9a37f57cb -> 32a0036343), guix-commits, 2022/07/22
- 03/15: guix gc: '--delete-generations' now deletes old Home generations.,
guix-commits <=
- 02/15: home: Add 'home-generation-base'., guix-commits, 2022/07/22
- 04/15: gnu: eigen: Update to 3.4.0., guix-commits, 2022/07/22
- 05/15: gnu: clojure-tools-cli: Update to 1.0.206., guix-commits, 2022/07/22
- 07/15: gnu: clojure-tools-deps-alpha: Update to 0.14.1212., guix-commits, 2022/07/22
- 06/15: gnu: clojure-tools-gitlibs: Update to 2.4.181., guix-commits, 2022/07/22
- 08/15: gnu: clojure-tools: Update to 1.11.1.1149., guix-commits, 2022/07/22
- 10/15: gnu: clojure-algo-generic: Fix test failing under AOT in Clojure 1.11.1., guix-commits, 2022/07/22
- 11/15: gnu: clojure-core-match: Update to 1.0.0., guix-commits, 2022/07/22
- 13/15: doc: Clarify "Replicating Guix" section., guix-commits, 2022/07/22
- 09/15: gnu: clojure: Update to 1.11.1., guix-commits, 2022/07/22