[PATCH 0/2] Let 'guix gc -d' delete old Home generations

  • Done
  • quality assurance status badge
Details
3 participants
  • Andrew Tropin
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 17 Jul 2022 17:19
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20220717151930.23383-1-ludo@gnu.org
Hi!

This change lets ‘guix gc -d 4m’ (say) do what one can expect, which is
to delete not just bare profile generations but also Home generations.

Thoughts?

Ludo’.

Ludovic Courtès (2):
home: Add 'home-generation-base'.
guix gc: '--delete-generations' now deletes old Home generations.

doc/guix.texi | 3 ++-
gnu/home.scm | 26 ++++++++++++++++++++++++--
guix/scripts/gc.scm | 6 ++++--
3 files changed, 30 insertions(+), 5 deletions(-)


base-commit: 4ce7f1fb24a111f3e92d5b889d1271bebf109d09
--
2.36.1
L
L
Ludovic Courtès wrote on 17 Jul 2022 17:21
[PATCH 2/2] guix gc: '--delete-generations' now deletes old Home generations.
(address . 56618@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20220717152117.23452-2-ludo@gnu.org
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(-)

Toggle diff (45 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 8fc8f53d0e..f3f3189f64 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 @@ (define-module (guix scripts gc)
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 @@ (define (delete-generations store pattern)
(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))
--
2.36.1
L
L
Ludovic Courtès wrote on 17 Jul 2022 17:21
[PATCH 1/2] home: Add 'home-generation-base'.
(address . 56618@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20220717152117.23452-1-ludo@gnu.org
* gnu/home.scm (%profile-generation-rx): New variable.
(home-generation-base): New procedure.
---
gnu/home.scm | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/home.scm b/gnu/home.scm
index a9f0a469a5..4ddbafe412 100644
--- a/gnu/home.scm
+++ b/gnu/home.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,7 +28,8 @@ (define-module (gnu home)
#:use-module (guix diagnostics)
#:use-module (guix gexp)
#:use-module (guix store)
-
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 regex)
#:export (home-environment
home-environment?
this-home-environment
@@ -38,7 +40,9 @@ (define-module (gnu home)
home-environment-services
home-environment-location
- home-environment-with-provenance))
+ home-environment-with-provenance
+
+ home-generation-base))
;;; Comment:
;;;
@@ -114,3 +118,21 @@ (define-gexp-compiler (home-environment-compiler (he <home-environment>)
(run-with-store store (home-environment-derivation he)
#:system system
#:target target)))))
+
+(define %profile-generation-rx
+ ;; Regexp that matches profile generation.
+ (make-regexp "(.*)-([0-9]+)-link$"))
+
+(define (home-generation-base file)
+ "If FILE is a Home generation GC root such as \"guix-home-42-link\",
+return its corresponding base---e.g., \"guix-home\". Otherwise return #f.
+
+This is similar to the 'generation-profile' procedure but applied to Home
+generations."
+ (match (regexp-exec %profile-generation-rx file)
+ (#f #f)
+ (m (let ((profile (match:substring m 1)))
+ ;; Distinguish from a "real" profile and from a system generation.
+ (and (file-exists? (string-append profile "/on-first-login"))
+ (file-exists? (string-append profile "/profile/manifest"))
+ profile)))))
--
2.36.1
A
A
Andrew Tropin wrote on 18 Jul 2022 14:51
(name . Ludovic Courtès)(address . ludo@gnu.org)
87mtd6d1ok.fsf@trop.in
On 2022-07-17 17:21, Ludovic Courtès wrote:

Toggle quote (57 lines)
> * gnu/home.scm (%profile-generation-rx): New variable.
> (home-generation-base): New procedure.
> ---
> gnu/home.scm | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/home.scm b/gnu/home.scm
> index a9f0a469a5..4ddbafe412 100644
> --- a/gnu/home.scm
> +++ b/gnu/home.scm
> @@ -1,5 +1,6 @@
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
> +;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -27,7 +28,8 @@ (define-module (gnu home)
> #:use-module (guix diagnostics)
> #:use-module (guix gexp)
> #:use-module (guix store)
> -
> + #:use-module (ice-9 match)
> + #:use-module (ice-9 regex)
> #:export (home-environment
> home-environment?
> this-home-environment
> @@ -38,7 +40,9 @@ (define-module (gnu home)
> home-environment-services
> home-environment-location
>
> - home-environment-with-provenance))
> + home-environment-with-provenance
> +
> + home-generation-base))
>
> ;;; Comment:
> ;;;
> @@ -114,3 +118,21 @@ (define-gexp-compiler (home-environment-compiler (he <home-environment>)
> (run-with-store store (home-environment-derivation he)
> #:system system
> #:target target)))))
> +
> +(define %profile-generation-rx
> + ;; Regexp that matches profile generation.
> + (make-regexp "(.*)-([0-9]+)-link$"))
> +
> +(define (home-generation-base file)
> + "If FILE is a Home generation GC root such as \"guix-home-42-link\",
> +return its corresponding base---e.g., \"guix-home\". Otherwise return #f.
> +
> +This is similar to the 'generation-profile' procedure but applied to Home
> +generations."
> + (match (regexp-exec %profile-generation-rx file)
> + (#f #f)
> + (m (let ((profile (match:substring m 1)))

Is home environment and operating system a profile itself? They reside
in /var/guix/profile, but they have profile/ directory inside, so do
they profiles themselves? I don't propose any changes, just asking.

Toggle quote (5 lines)
> + ;; Distinguish from a "real" profile and from a system generation.
> + (and (file-exists? (string-append profile "/on-first-login"))
> + (file-exists? (string-append profile "/profile/manifest"))
> + profile)))))

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLVVzsACgkQIgjSCVjB
3rCKtA/8C8G8e1p6PhEcYB2l9eys4LaI550Ly5Zw/eoDw1pO7nB6UhKRL27j2r1P
M96hnAYUUkwJdBGVPsH2B/6Q9G2BwxWIRNEtJ2Lwfk+hPlnHyclLSeD8kiLP0XXN
ztDcPfWYTud4tB0hbjvk5DQ90icRcyEs5CpoWSPbFhBO2Yn8orzeG+21dEwL61/O
i++3rN8Spsf/1zo91A5mGzoIG8mMErzVFyeEW9dGTC7mNoe09h/0iTifk6kEVSfU
nq6xArt9plBs4Km56mUKc2P4o0gC5RBqFqvpw/jPI6OTuDEaGKl8/Ba4VDcYGsTa
R28C+pyQfnaWUsgkV0lc8TyFwL3lM6q/2eSUUdDLm6S0jdvlLPP3cQGQQz0HU1vk
Uaf0SW1IVCRQYEGZDHBlb13AGTSMBVEyF9OltpJ02BerJVBOcDtoSo44abOieVGI
94MVjv5V45v/ZJV2Uiz5nN0VDRYsEGX+7TyjIh/d31bIMoL5gLg1OygN/aNPJLr+
XwxzYidEs3aervJKw1cpDrKK3JRlU6GJQkwrBDcDRI9jiI5zBVRGPiNCVxI6ELK9
QYVkHjtUTsvKoor+T41i0q+6xYuQR6P8xFaffhjmEn1RH2pIYaqxYFVaClJG52CC
JMYOyOU1Smko7SIXlD29JIj+wGvKDx4YmEjzkcnvFwOH2wcneec=
=gbTI
-----END PGP SIGNATURE-----

A
A
Andrew Tropin wrote on 18 Jul 2022 14:59
Re: [bug#56618] [PATCH 0/2] Let 'guix gc -d' delete old Home generations
(name . Ludovic Courtès)(address . ludo@gnu.org)
87k08ad1b7.fsf@trop.in
On 2022-07-17 17:19, Ludovic Courtès wrote:

Toggle quote (7 lines)
> Hi!
>
> This change lets ‘guix gc -d 4m’ (say) do what one can expect, which is
> to delete not just bare profile generations but also Home generations.
>
> Thoughts?

Hi Ludovic,

Sounds reasonable. Do we want the same functionality for operating
system generations if gc called by root or with sudo?

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLVWRwACgkQIgjSCVjB
3rCVLg//UYx/sqkYT4AepwMs/5Qnx869PuVWXXJzLcp8OB1byUjsQcT5iY2UCnV5
0vWzX0Ha+jK/+HilVdI+CL5Mu7mWEN0t1y9Y2o3LLFZKasEBFMnnfSOwlV2ryS+y
WQ/XLbN6Iwgd46ElTqkMw3rgqN4rhBH+jEs0jVrTrRcm3HR5F4peHtxxxbBNKhU9
bpca/O1aT6nb2aB+0RjQS/FG2/jnabB9RaFD400Kfa/pFEwoyKlf+U5CBlV+lIMj
edbvYbmXJt6wpVY5cSag00LrtXMXp8fdB9vkKPRHUpwJilOWAUMlXRtj8WzTUQre
F7uNl5hgleuM9WIrRdvAJV0HLqkbnq+mq8EBSuTHqVa0c+jW+FR02Oz5G9SCy3SB
YexEw8EjTG20YhHKipbhW78fpUCjY9pSAZdPQvNU471PwWQzAJ1F4CDLeqI+f4zP
xEhqDg/wxYF4Cf9dHDZLexKUAmpqoYc5v6zVIuEh0Vit5pV6jLKIXS8riuVO56TF
cgQiKWA/w0hUwqupNrisUDZgZcjUFO+U58CTX4iWT2LUl2A4Fh8pSkZNDt2ov8Oa
B0g116qc0cOZUPv1+gDJ1G4fbsFJFBlKlng4QYILYswIS7o9IrcFDmd9Z/Tm8QoM
VQBA6a7UD0xm3dhW5b6maBbtzwE3XBtZcBbeYFx6s7q8VBghXag=
=C6ps
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 19 Jul 2022 10:01
Re: [bug#56618] [PATCH 1/2] home: Add 'home-generation-base'.
(name . Andrew Tropin)(address . andrew@trop.in)(address . 56618@debbugs.gnu.org)
87bktlwmy8.fsf@gnu.org
Hi,

Andrew Tropin <andrew@trop.in> skribis:

Toggle quote (4 lines)
> Is home environment and operating system a profile itself? They reside
> in /var/guix/profile, but they have profile/ directory inside, so do
> they profiles themselves?

No, they’re not profiles (they contain a profile), so they need to be
treated specially for the purposes of ‘guix gc -d’.

Ludo’.
L
L
Ludovic Courtès wrote on 19 Jul 2022 10:28
Re: [bug#56618] [PATCH 0/2] Let 'guix gc -d' delete old Home generations
(name . Andrew Tropin)(address . andrew@trop.in)(address . 56618@debbugs.gnu.org)
875yjtwlo4.fsf@gnu.org
Hi,

Andrew Tropin <andrew@trop.in> skribis:

Toggle quote (3 lines)
> Sounds reasonable. Do we want the same functionality for operating
> system generations if gc called by root or with sudo?

It would be nice, but it’s not really doable: currently ‘guix system
delete-generations’ reinstalls the bootloader, which means it needs to
build things (we can’t just delete old generations).

Ludo’.
A
A
Andrew Tropin wrote on 19 Jul 2022 11:46
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 56618@debbugs.gnu.org)
87bktlbfjo.fsf@trop.in
On 2022-07-19 10:28, Ludovic Courtès wrote:

Toggle quote (11 lines)
> Hi,
>
> Andrew Tropin <andrew@trop.in> skribis:
>
>> Sounds reasonable. Do we want the same functionality for operating
>> system generations if gc called by root or with sudo?
>
> It would be nice, but it’s not really doable: currently ‘guix system
> delete-generations’ reinstalls the bootloader, which means it needs to
> build things (we can’t just delete old generations).

Make sense.

BTW, a little offtopic (related to gc, but not related to these changes)
problem I have, which is very annoying: After guix gc, guix home
rebuilds/redownloads a lot of stuff. The configuration and channels are
absolutely the same.

guix home reconfigure home-configs.scm # builds/downloads a lot of stuff
guix gc
guix home reconfigure home-configs.scm # do everything again

Am I missing something and it is expected behavior or is it a bug?

Toggle snippet (238 lines)
-*- mode: compilation; default-directory: "~/work/abcdw/rde/" -*-
Compilation started at Tue Jul 19 12:03:18

make -k home
RDE_TARGET=ixy-home \
GUILE_LOAD_PATH=./ \
guix home --fallback reconfigure --allow-downgrades \
--substitute-urls='http://ci.guix.trop.in https://bordeaux.guix.gnu.org https://substitutes.nonguix.org' \
./rde/examples/abcdw/configs.scm
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
5.3 MB will be downloaded
curl-7.84.0-doc 667KiB 1.5MiB/s 00:00 [##################] 100.0%
expat-2.4.1 97KiB 1.7MiB/s 00:00 [##################] 100.0%
openssl-1.1.1l 1.8MiB 3.3MiB/s 00:01 [##################] 100.0%
fontconfig-minimal-2.13.94 166KiB 1.6MiB/s 00:00 [##################] 100.0%
mit-krb5-1.19.2 1.1MiB 3.1MiB/s 00:00 [##################] 100.0%
curl-7.84.0 410KiB 2.0MiB/s 00:00 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
13.2 MB will be downloaded
i2pd-2.41.0 1.3MiB 2.8MiB/s 00:00 [##################] 100.0%
curl-7.79.1 377KiB 3.5MiB/s 00:00 [##################] 100.0%
cyrus-sasl-2.1.27 223KiB 2.8MiB/s 00:00 [##################] 100.0%
eudev-3.2.11 2.0MiB 7.2MiB/s 00:00 [##################] 100.0%
git-minimal-2.36.1 4.9MiB 5.8MiB/s 00:01 [##################] 100.0%
openldap-2.4.57 1.2MiB 5.8MiB/s 00:00 [##################] 100.0%
pcsc-lite-1.9.3 93KiB 7.1MiB/s 00:00 [##################] 100.0%
gnupg-2.2.32 2.3MiB 7.5MiB/s 00:00 [##################] 100.0%
7.5 MB will be downloaded
gnutls-3.7.2-doc 1.0MiB 2.1MiB/s 00:00 [##################] 100.0%
gnutls-3.7.2-debug 4.4MiB 3.9MiB/s 00:01 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 100.0%
The following derivations will be built:
/gnu/store/9qv8y6075lb425zcy4ld7mr30znhw1qh-emacs-next-pgtk-latest-29.0.50-3.9ff2f0b.drv
/gnu/store/dzgcfggzv80m08m24plq18gvjcz0nyxw-emacs-next-pgtk-latest-29.0.50-3.9ff2f0b-checkout.drv

113.0 MB will be downloaded
perl-authen-sasl-2.16 37KiB 445KiB/s 00:00 [##################] 100.0%
apr-1.7.0 297KiB 1.6MiB/s 00:00 [##################] 100.0%
atk-2.36.0 274KiB 3.1MiB/s 00:00 [##################] 100.0%
apr-util-1.6.1 168KiB 1.6MiB/s 00:00 [##################] 100.0%
cairo-1.16.0 695KiB 4.7MiB/s 00:00 [##################] 100.0%
cairo-1.16.0 695KiB 4.1MiB/s 00:00 [##################] 100.0%
dbus-1.12.20 286KiB 2.8MiB/s 00:00 [##################] 100.0%
elogind-246.10 1.2MiB 3.9MiB/s 00:00 [##################] 100.0%
at-spi2-core-2.40.0 211KiB 1.2MiB/s 00:00 [##################] 100.0%
avahi-0.8 384KiB 2.7MiB/s 00:00 [##################] 100.0%
at-spi2-atk-2.38.0 67KiB 1.5MiB/s 00:00 [##################] 100.0%
dbus-1.12.20-doc 1.2MiB 3.9MiB/s 00:00 [##################] 100.0%
gd-2.3.2 137KiB 1.7MiB/s 00:00 [##################] 100.0%
ghostscript-9.54.0 11.8MiB 5.1MiB/s 00:02 [##################] 100.0%
ghostscript-with-cups-9.54.0 11.8MiB 4.8MiB/s 00:02 [##################] 100.0%
git-2.36.1-subtree 19KiB 3.2MiB/s 00:00 [##################] 100.0%
gsasl-1.10.0 295KiB 2.9MiB/s 00:00 [##################] 100.0%
gusb-minimal-0.3.5 49KiB 1.3MiB/s 00:00 [##################] 100.0%
harfbuzz-2.8.2 879KiB 2.0MiB/s 00:00 [##################] 100.0%
libcloudproviders-minimal-0.3.1 32KiB 2.6MiB/s 00:00 [##################] 100.0%
libfido2-1.9.0 210KiB 2.0MiB/s 00:00 [##################] 100.0%
libgudev-236 26KiB 1.8MiB/s 00:00 [##################] 100.0%
libinput-minimal-1.19.2 276KiB 1.9MiB/s 00:00 [##################] 100.0%
libproxy-0.4.17 69KiB 1.0MiB/s 00:00 [##################] 100.0%
libseat-0.7.0 17KiB 1.5MiB/s 00:00 [##################] 100.0%
glib-networking-2.70.0 133KiB 1.8MiB/s 00:00 [##################] 100.0%
libsecret-0.20.4 282KiB 2.4MiB/s 00:00 [##################] 100.0%
libsm-1.2.3 43KiB 5.6MiB/s 00:00 [##################] 100.0%
git-2.36.1-credential-libsecret 12KiB 1.1MiB/s 00:00 [##################] 100.0%
libtirpc-1.3.1 133KiB 2.4MiB/s 00:00 [##################] 100.0%
libxft-2.3.3 48KiB 1.3MiB/s 00:00 [##################] 100.0%
libxt-1.2.1 193KiB 1.9MiB/s 00:00 [##################] 100.0%
m17n-lib-1.8.0 428KiB 4.3MiB/s 00:00 [##################] 100.0%
libxmu-1.1.3 73KiB 1.3MiB/s 00:00 [##################] 100.0%
libxpm-3.5.13 54KiB 1.1MiB/s 00:00 [##################] 100.0%
mailutils-3.15 1.7MiB 3.7MiB/s 00:00 [##################] 100.0%
module-import-compiled 525KiB 3.0MiB/s 00:00 [##################] 100.0%
module-import-compiled 212KiB 4.2MiB/s 00:00 [##################] 100.0%
pango-1.48.10 375KiB 4.6MiB/s 00:00 [##################] 100.0%
perl-digest-hmac-1.04 13KiB 1.1MiB/s 00:00 [##################] 100.0%
perl-gssapi-0.28 40KiB 5.5MiB/s 00:00 [##################] 100.0%
perl-io-socket-ssl-2.068 163KiB 2.0MiB/s 00:00 [##################] 100.0%
perl-net-smtp-ssl-1.04 3KiB 404KiB/s 00:00 [##################] 100.0%
perl-net-ssleay-1.92 273KiB 3.6MiB/s 00:00 [##################] 100.0%
perl-term-readkey-2.38 18KiB 11.5MiB/s 00:00 [##################] 100.0%
polkit-0.120 198KiB 2.4MiB/s 00:00 [##################] 100.0%
poppler-21.07.0 1.5MiB 4.0MiB/s 00:00 [##################] 100.0%
colord-minimal-1.4.5 712KiB 2.5MiB/s 00:00 [##################] 100.0%
cups-filters-1.28.9 922KiB 3.6MiB/s 00:00 [##################] 100.0%
python-3.9.9 11.1MiB 4.1MiB/s 00:03 [##################] 100.0%
cups-2.3.3op2 5.2MiB 4.3MiB/s 00:01 [##################] 100.0%
git-2.36.1 5.9MiB 4.0MiB/s 00:01 [##################] 100.0%
glib-2.70.2-bin 122KiB 1.5MiB/s 00:00 [##################] 100.0%
git-2.36.1-credential-netrc 11KiB 2.0MiB/s 00:00 [##################] 100.0%
git-2.36.1-send-email 25KiB 7.2MiB/s 00:00 [##################] 100.0%
serf-1.3.9 74KiB 1.6MiB/s 00:00 [##################] 100.0%
shared-mime-info-1.15 774KiB 3.4MiB/s 00:00 [##################] 100.0%
tk-8.6.11.1 1.3MiB 3.5MiB/s 00:00 [##################] 100.0%
gdk-pixbuf-2.42.4 531KiB 2.4MiB/s 00:00 [##################] 100.0%
git-2.36.1-gui 103KiB 1.3MiB/s 00:00 [##################] 100.0%
librsvg-2.50.7 2.6MiB 3.1MiB/s 00:01 [##################] 100.0%
utf8proc-2.5.0 65KiB 2.5MiB/s 00:00 [##################] 100.0%
wayland-1.20.0 172KiB 1.1MiB/s 00:00 [##################] 100.0%
subversion-1.14.1 2.4MiB 2.8MiB/s 00:01 [##################] 100.0%
libxkbcommon-1.3.0 309KiB 2.6MiB/s 00:00 [##################] 100.0%
git-2.36.1-svn 25KiB 3.1MiB/s 00:00 [##################] 100.0%
mesa-21.3.8 26.0MiB 3.4MiB/s 00:08 [##################] 100.0%
swaybg-1.0 15KiB 1.3MiB/s 00:00 [##################] 100.0%
libepoxy-1.5.5 345KiB 2.9MiB/s 00:00 [##################] 100.0%
xauth-1.1.2 22KiB 2.1MiB/s 00:00 [##################] 100.0%
gtk%2B-3.24.30 7.8MiB 4.6MiB/s 00:02 [##################] 100.0%
openssh-8.9p1 1.0MiB 3.8MiB/s 00:00 [##################] 100.0%
xorg-server-xwayland-21.1.3 958KiB 3.1MiB/s 00:00 [##################] 100.0%
building /gnu/store/dzgcfggzv80m08m24plq18gvjcz0nyxw-emacs-next-pgtk-latest-29.0.50-3.9ff2f0b-checkout.drv...
wlroots-0.14.1 315KiB 1.3MiB/s 00:00 [##################] 100.0%
building /gnu/store/9qv8y6075lb425zcy4ld7mr30znhw1qh-emacs-next-pgtk-latest-29.0.50-3.9ff2f0b.drv...
sway-1.6.1 4.9MiB 1.8MiB/s 00:03 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
52.8 MB will be downloaded
postgresql-13.7 7.8MiB 5.8MiB/s 00:01 [##################] 100.0%
guile-avahi-0.4.0-1.6d43caf 51KiB 779KiB/s 00:00 [##################] 100.0%
libgit2-1.3.0 624KiB 3.3MiB/s 00:00 [##################] 100.0%
libssh-0.9.6 257KiB 5.1MiB/s 00:00 [##################] 100.0%
guile-git-0.5.2 496KiB 4.2MiB/s 00:00 [##################] 100.0%
guile-ssh-0.15.1 242KiB 1.7MiB/s 00:00 [##################] 100.0%
guix-1.3.0-29.9e46320 48.2MiB 5.3MiB/s 00:09 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
33.2 MB will be downloaded
gstreamer-1.18.5 1.6MiB 2.8MiB/s 00:01 [##################] 100.0%
graphene-1.10.6 97KiB 2.0MiB/s 00:00 [##################] 100.0%
libical-3.0.10 588KiB 1.8MiB/s 00:00 [##################] 100.0%
gst-plugins-base-1.18.5 2.2MiB 7.2MiB/s 00:00 [##################] 100.0%
bluez-5.61 948KiB 1.2MiB/s 00:01 [##################] 100.0%
mariadb-10.5.12-lib 4.9MiB 6.9MiB/s 00:01 [##################] 100.0%
postgresql-13.6 7.8MiB 7.9MiB/s 00:01 [##################] 100.0%
pulseaudio-15.0 1.7MiB 6.8MiB/s 00:00 [##################] 100.0%
python-dbus-1.2.18 100KiB 1.1MiB/s 00:00 [##################] 100.0%
qtbase-5.15.2 14.4MiB 2.5MiB/s 00:06 [##################] 100.0%
jack2-1.9.21 475KiB 4.7MiB/s 00:00 [##################] 100.0%
pinentry-qt-1.2.0 87KiB 1.9MiB/s 00:00 [##################] 100.0%
pipewire-0.3.43 1.7MiB 2.7MiB/s 00:01 [##################] 100.0%
wireplumber-0.4.6 312KiB 2.2MiB/s 00:00 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
1.5 MB will be downloaded
transmission-3.00 664KiB 2.3MiB/s 00:00 [##################] 100.0%
transmission-3.00-gui 757KiB 3.3MiB/s 00:00 [##################] 100.0%
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 100.0%
The following derivations will be built:
/gnu/store/svdpvbschb625g5y3m2h1p19m3bny2g5-emacs-telega-0.8.03-0.733194c.drv
/gnu/store/6imiazlq3ba4pz3cigxjald3yykng08d-emacs-telega-0.8.03-0.733194c-checkout.drv
/gnu/store/4gp0rrnvspbsd1zx6g7n9mmjdv3vc176-emacs-telega-0.8.03-0.733194c-checkout.drv
/gnu/store/gpp941v85r6k5va484yq85i90ap8h09d-emacs-telega-server-0.8.03-0.733194c.drv
/gnu/store/b8jvpcphmbjyhw5na7l85kmzm17s1fjk-tdlib-1.8.3-0.047246f.drv
/gnu/store/j8fn2f40a2ys9pqsb67b7zy4v7348449-tdlib-1.8.3-0.047246f-checkout.drv
/gnu/store/lb3ggs070j2500im5p23k2srnz2r1fc3-emacs-telega-0.8.03-0.733194c-checkout.drv
/gnu/store/8brfm023ainsg7hx9kyawqzgy6s8gaaa-emacs-telega-0.8.03-0.733194c-checkout.drv

90.3 MB will be downloaded
brightnessctl-0.5.1 10KiB 1.5MiB/s 00:00 [##################] 100.0%
cairomm-1.14.2 104KiB 422KiB/s 00:00 [##################] 100.0%
doxygen-1.9.1 3.7MiB 2.4MiB/s 00:02 [##################] 100.0%
emacs-minimal-28.1 38.1MiB 7.5MiB/s 00:05 [##################] 100.0%
freeglut-3.2.1 105KiB 1.5MiB/s 00:00 [##################] 100.0%
glibmm-2.64.5 1.2MiB 2.4MiB/s 00:01 [##################] 100.0%
glu-9.0.1 266KiB 3.2MiB/s 00:00 [##################] 100.0%
atkmm-2.28.1 121KiB 1.4MiB/s 00:00 [##################] 100.0%
ftgl-2.4.0 75KiB 1.4MiB/s 00:00 [##################] 100.0%
gperf-3.1 95KiB 1.5MiB/s 00:00 [##################] 100.0%
grim-1.4.0 15KiB 2.4MiB/s 00:00 [##################] 100.0%
gtk%2B-2.24.33 5.1MiB 3.4MiB/s 00:01 [##################] 100.0%
gtk-layer-shell-0.6.0 57KiB 668KiB/s 00:00 [##################] 100.0%
guile-2.0.14 3.0MiB 4.4MiB/s 00:01 [##################] 100.0%
libass-0.15.1 94KiB 1.7MiB/s 00:00 [##################] 100.0%
libbluray-1.0.2 144KiB 2.1MiB/s 00:00 [##################] 100.0%
libdbusmenu-16.04.0-496 157KiB 981KiB/s 00:00 [##################] 100.0%
libva-2.13.0 163KiB 1.9MiB/s 00:00 [##################] 100.0%
libappindicator-12.10.1-0-298 54KiB 430KiB/s 00:00 [##################] 100.0%
libwebp-1.2.0 307KiB 2.4MiB/s 00:00 [##################] 100.0%
libzip-1.9.2 81KiB 1.3MiB/s 00:00 [##################] 100.0%
imlib2-1.9.0 546KiB 2.7MiB/s 00:00 [##################] 100.0%
module-import-compiled 217KiB 2.3MiB/s 00:00 [##################] 100.0%
libcaca-0.99.beta19 282KiB 2.9MiB/s 00:00 [##################] 100.0%
module-import-compiled 189KiB 881KiB/s 00:00 [##################] 100.0%
module-import-compiled 207KiB 1.2MiB/s 00:00 [##################] 100.0%
module-import-compiled 86KiB 1.8MiB/s 00:00 [##################] 100.0%
module-import-compiled 55KiB 1.5MiB/s 00:00 [##################] 100.0%
mpv-mpris-0.6 11KiB 2.2MiB/s 00:00 [##################] 100.0%
openal-1.20.1 663KiB 2.6MiB/s 00:00 [##################] 100.0%
pangomm-2.46.0 119KiB 1.3MiB/s 00:00 [##################] 100.0%
playerctl-2.4.1 98KiB 5.1MiB/s 00:00 [##################] 100.0%
gtkmm-3.24.5 2.0MiB 3.0MiB/s 00:01 [##################] 100.0%
postgresql-14.4 8.8MiB 2.9MiB/s 00:03 [##################] 100.0%
rhash-1.4.2 161KiB 1.6MiB/s 00:00 [##################] 100.0%
sdl2-2.0.14 1.2MiB 2.9MiB/s 00:00 [##################] 100.0%
cmake-minimal-3.21.4 9.0MiB 3.3MiB/s 00:03 [##################] 100.0%
slurp-1.3.2 17KiB 1.7MiB/s 00:00 [##################] 100.0%
srt-1.4.4 504KiB 967KiB/s 00:01 [##################] 100.0%
swappy-1.4.0 31KiB 1.3MiB/s 00:00 [##################] 100.0%
ffmpeg-4.4.2 8.9MiB 3.1MiB/s 00:03 [##################] 100.0%
swayidle-1.7 14KiB 1.1MiB/s 00:00 [##################] 100.0%
tidy-20091223 236KiB 1.7MiB/s 00:00 [##################] 100.0%
waybar-0.9.9 466KiB 2.4MiB/s 00:00 [##################] 100.0%
php-7.4.26 11.9MiB 3.2MiB/s 00:04 [##################] 100.0%
xset-1.2.4 19KiB 2.5MiB/s 00:00 [##################] 100.0%
building /gnu/store/8brfm023ainsg7hx9kyawqzgy6s8gaaa-emacs-telega-0.8.03-0.733194c-checkout.drv...
xdg-utils-1.1.3 53KiB 431KiB/s 00:00 [##################] 100.0%
building /gnu/store/lb3ggs070j2500im5p23k2srnz2r1fc3-emacs-telega-0.8.03-0.733194c-checkout.drv...
wl-clipboard-2.0.0 24KiB 380KiB/s 00:00 [##################] 100.0%
applying 4 grafts for git-minimal-2.36.1 ...
building /gnu/store/j8fn2f40a2ys9pqsb67b7zy4v7348449-tdlib-1.8.3-0.047246f-checkout.drv...
building /gnu/store/b8jvpcphmbjyhw5na7l85kmzm17s1fjk-tdlib-1.8.3-0.047246f.drv...
building /gnu/store/gpp941v85r6k5va484yq85i90ap8h09d-emacs-telega-server-0.8.03-0.733194c.drv...
building /gnu/store/svdpvbschb625g5y3m2h1p19m3bny2g5-emacs-telega-0.8.03-0.733194c.drv...
substitute: updating substitutes from 'http://ci.guix.trop.in'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 100.0%
The following derivations will be built:
/gnu/store/q380glwqh5r417a5nj7ynb1y39nsjn7x-rofi-wayland-1.7.3+wayland1.drv
/gnu/store/4r2ak0qxfpgcicr0xvlyvl5300lz20g2-rofi-1.7.3+wayland1.tar.xz.drv

232.5 MB will be downloaded
gtk%2B-2.24.33-doc 1.3MiB 1.4MiB/s 00:01 [##################] 100.0%
alacritty-0.9.0 1.6MiB 2.9MiB/s 00:01 [##################] 100.0%
bison-3.7.6 686KiB 2.5MiB/s 00:00 [##################] 100.0%
check-0.15.2 110KiB 779KiB/s 00:00 [##################] 100.0%
desktop-file-utils-0.26 43KiB 441KiB/s 00:00 [##################] 100.0%
dmenu-5.1 17KiB 1.1MiB/s 00:00 [##################] 100.0%
flex-2.6.4 280KiB 969KiB/s 00:00 [##################] 100.0%
gamin-0.1.10 56KiB 614KiB/s 00:00 [##################] 100.0%
glib-2.70.2-static 1.2MiB 3.4MiB/s 00:00 [##################] 100.0%
gmime-3.2.7 454KiB 1.9MiB/s 00:00 [##################] 100.0%
glib-2.70.2-debug 10.1MiB 3.4MiB/s 00:03 [##################] 100.0%
gtk%2B-3.24.30-bin 760KiB 3.7MiB/s 00:00 [##################] 100.0%
gtk%2B-3.24.30-doc 3.0MiB 3.3MiB/s 00:01 [##################] 100.0%
gtk%2B-3.24.30-debug 11.3MiB 3.2MiB/s 00:04 [##################] 100.0%
json-glib-1.6.2 198KiB 1.1MiB/s 00:00 [##################] 100.0%
libcacard-2.8.1
This message was truncated. Download the full message here.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLWfYwACgkQIgjSCVjB
3rBm2w/8CQT1SW4qG2gaVvugnsu6EnKpcTTuuNz1mqC/uh6UTVlDyTNpSNygJWBS
N/6GJBeAfMkll90Ejhg8/mGnjF8NULgAxuyhMo0JRf3BDn0Q+cJPMXD67AZxM4O5
bIbGVO4DGvXQSZSr4yb92I7IsV5Qeg40MsuZuABY/R7Gth6pdDwfoOsXKeGI1OGd
4l9ApVutGkvdHYudFeEOEXMeB9iMrHIyX/zqIt18iIUpiSbOzEqp1ft0DoQ55ODu
h36rbXR7OgsfjCYwQoutlpWPrCDjRMRnM9CuOjxknoZfnjQxne5jqJnIRARZg+v9
nVnbjYfXQySOOVyG2ja9djERHkTRXQm+8gWC39cGIWWafaqUhltwyXICCgAaTh5Q
AsZSr8YOQ+h7McscLlkqX33j1VEFlQdmlTg+lM32buESTnKLCx/zu+zVXwtqTSVj
Vzzq9d3s8TNu/G2Su39OggPQe1HfsOiHhoG28rdsON1Os/cjS8n1+Gt9ZIZ2eBsO
N8jUEO8aiabI4OmyVRnJ8qdTrGUoHDyWXpFFFY8Cz1O4TkPC9j8u2qSWJIFh/Ryk
KCHbYWSPgEdq+m3U5aVYZxJMnyFbIVBnYz5UG15hAyxVfJ2ncwnQyv23nlJVDbsR
ic1R6VKs2q6zULSAhz3LoBoAXshfdLSt2hqLTdcfZ3UT1W2F0JE=
=X1P+
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 21 Jul 2022 11:07
(name . Andrew Tropin)(address . andrew@trop.in)(address . 56618@debbugs.gnu.org)
87v8rqn8a7.fsf@gnu.org
Hi,

Andrew Tropin <andrew@trop.in> skribis:

Toggle quote (11 lines)
> BTW, a little offtopic (related to gc, but not related to these changes)
> problem I have, which is very annoying: After guix gc, guix home
> rebuilds/redownloads a lot of stuff. The configuration and channels are
> absolutely the same.
>
> guix home reconfigure home-configs.scm # builds/downloads a lot of stuff
> guix gc
> guix home reconfigure home-configs.scm # do everything again
>
> Am I missing something and it is expected behavior or is it a bug?

It’s an expected annoyance: to determine whether a graft needs to be
applied, we first need to download/build the ungrafted variant, which is
why you’re seeing this (this is worsened by the fact that many packages
are candidates for grafting currently on ‘master’).

Ludo’.
M
M
Maxim Cournoyer wrote on 21 Jul 2022 22:10
(name . Ludovic Courtès)(address . ludo@gnu.org)
87y1wmp6qv.fsf@gmail.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (20 lines)
> Hi,
>
> Andrew Tropin <andrew@trop.in> skribis:
>
>> BTW, a little offtopic (related to gc, but not related to these changes)
>> problem I have, which is very annoying: After guix gc, guix home
>> rebuilds/redownloads a lot of stuff. The configuration and channels are
>> absolutely the same.
>>
>> guix home reconfigure home-configs.scm # builds/downloads a lot of stuff
>> guix gc
>> guix home reconfigure home-configs.scm # do everything again
>>
>> Am I missing something and it is expected behavior or is it a bug?
>
> It’s an expected annoyance: to determine whether a graft needs to be
> applied, we first need to download/build the ungrafted variant, which is
> why you’re seeing this (this is worsened by the fact that many packages
> are candidates for grafting currently on ‘master’).

A perhaps naive idea: could we register GC roots for the ungrafted
variant when grafted? To avoid having to fetch it anew following 'guix
gc' ?

Thanks,

Maxim
L
L
Ludovic Courtès wrote on 22 Jul 2022 14:20
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87zgh1gwz0.fsf@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (2 lines)
> Ludovic Courtès <ludo@gnu.org> writes:

[...]

Toggle quote (9 lines)
>> It’s an expected annoyance: to determine whether a graft needs to be
>> applied, we first need to download/build the ungrafted variant, which is
>> why you’re seeing this (this is worsened by the fact that many packages
>> are candidates for grafting currently on ‘master’).
>
> A perhaps naive idea: could we register GC roots for the ungrafted
> variant when grafted? To avoid having to fetch it anew following 'guix
> gc' ?

And then we need code to remove those GC roots at some point, etc. To
me that seems like a can of worms and lack of separation of concerns.

A related topic is GC. If personally only ever use ‘guix gc -F25G’ or
similar; I almost never run ‘guix gc’ without arguments. Perhaps we
should more clearly advocate that and/or have a Guix System service
enabled by default that does something along these lines.

Thoughts?

Ludo’.
L
L
Ludovic Courtès wrote on 23 Jul 2022 00:42
Re: bug#56618: [PATCH 0/2] Let 'guix gc -d' delete old Home generations
(address . 56618-done@debbugs.gnu.org)(name . Andrew Tropin)(address . andrew@trop.in)
87y1wkepm7.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (3 lines)
> home: Add 'home-generation-base'.
> guix gc: '--delete-generations' now deletes old Home generations.

Pushed as ba22560627f848f40891a56355ff26b6de1380bc.
Closed
M
M
Maxim Cournoyer wrote on 25 Jul 2022 04:04
Re: [bug#56618] [PATCH 0/2] Let 'guix gc -d' delete old Home generations
(name . Ludovic Courtès)(address . ludo@gnu.org)
878roi9cdk.fsf@gmail.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (20 lines)
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> It’s an expected annoyance: to determine whether a graft needs to be
>>> applied, we first need to download/build the ungrafted variant, which is
>>> why you’re seeing this (this is worsened by the fact that many packages
>>> are candidates for grafting currently on ‘master’).
>>
>> A perhaps naive idea: could we register GC roots for the ungrafted
>> variant when grafted? To avoid having to fetch it anew following 'guix
>> gc' ?
>
> And then we need code to remove those GC roots at some point, etc. To
> me that seems like a can of worms and lack of separation of concerns.

OK.

Toggle quote (5 lines)
> A related topic is GC. If personally only ever use ‘guix gc -F25G’ or
> similar; I almost never run ‘guix gc’ without arguments. Perhaps we
> should more clearly advocate that and/or have a Guix System service
> enabled by default that does something along these lines.

If I'm not mistaken, the problem with 'guix gc -F' (or guix gc) in
general, is that it doesn't start by deleting the *oldest*, i.e. the
store items the user no longer use/cares about. So you could have 'guix
gc -F25G' prune these recently fetched non-grafted variants again and
again, if you are unlucky.

Perhaps we could arrange for 'guix gc' to start deleting oldest items
first (as a default behavior)? Then the above advice would provide more
value.

Thanks,

Maxim
L
L
Ludovic Courtès wrote on 1 Aug 2022 14:39
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87v8rcxhmp.fsf@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (4 lines)
> Perhaps we could arrange for 'guix gc' to start deleting oldest items
> first (as a default behavior)? Then the above advice would provide more
> value.

Right now, the garbage collector simply collects unused items, without a
least-recently-used (LRU) policy or any such thing.

Given that in the store database items have a registration time (see
‘schema.sql’), it might be possible to sort items by registration date
before deleting them, and thus get some sort of LRU behavior. We’d have
to check the feasibility and run-time cost.

Ludo’.
?