unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: About /var/guix/profiles and guix pull generations
Date: Sun, 09 Dec 2018 14:21:48 -0800	[thread overview]
Message-ID: <87lg4yz6gz.fsf@gmail.com> (raw)
In-Reply-To: <87k1kivmzt.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 09 Dec 2018 14:38:30 +0100")

[-- Attachment #1: Type: text/plain, Size: 3283 bytes --]

Hi Pierre,

Awesome, thank you for the patch!

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> -generations and collecting garbage, along these lines:
> +generations, deleting old Guix checkouts and collecting garbage, along these
> +lines:

I'm not sure what you mean by "Guix checkouts".  Do you mean a Git
checkout of Guix's Git repository?  If so, why would deleting it help?

>  @example
> -guix package -p ~s --delete-generations=1m
> -guix gc
> -@end example\n")
> -                                profile))
> +guix package --profile=~s --delete-generations=1m
> +guix package --profile=~s --delete-generations=1m
> +guix gc --free-space=5G
> +@end example

This part seems reasonable to me.  We might also mention that others
users may have default profiles of their own.  Something like:

"If there are multiple users of Guix on this system, you might want to
repeat these commands for each user."

> +You might also want to delete old non-default profiles in
> +/var/guix/gcroots/auto.")

This is a little tricky.  This might make people think they should
delete the links directly from /var/guix/gcroots/auto.  For example, if
you create a profile at /tmp/myprofile via

  guix package --profile=/tmp/myprofile -i coreutils

you will get the following symlink structure:

--8<---------------cut here---------------start------------->8---
[0] marusich@garuda.local:~/guix
$ ls -al /tmp/myprofile*
lrwxrwxrwx 1 marusich users 16 Dec  9 13:56 /tmp/myprofile -> myprofile-1-link
lrwxrwxrwx 1 marusich users 51 Dec  9 13:56 /tmp/myprofile-1-link -> /gnu/store/l4vnx2fpi0b090bg7prjbq5hzlb3skpg-profile
[0] marusich@garuda.local:~/guix
$ ls -al /var/guix/gcroots/auto | grep myprofile
lrwxrwxrwx 1 root root   21 Dec  9 13:56 f2j55vpd15brhsqdwjzshwcxid1g8q9q -> /tmp/myprofile-1-link
[0] marusich@garuda.local:~/guix
$ 
--8<---------------cut here---------------end--------------->8---

If you delete /var/guix/gcroots/auto/f2j55vpd15brhsqdwjzshwcxid1g8q9q,
liveness no longer flows through /tmp/myprofile-1-link because you've
removed the GC root, and the guix-daemon won't know about the profile in
/tmp.  However, the profile is still there!  You can still use coreutils
via /tmp/myprofile-1-link, even though coreutils might get garbage
collected.  That isn't good.

In the case of a non-default profile like /tmp/myprofile, it's safe to
remove /tmp/myprofile and /tmp/myprofile-1-link directly (e.g., via "rm
/tmp/myprofile*").  When guix-daemon next runs GC, it will notice that
/var/guix/gcroots/auto/f2j55vpd15brhsqdwjzshwcxid1g8q9q is now broken,
and it will remove the broken symlink.

Maybe we could change

"You might also want to delete old non-default profiles in
/var/guix/gcroots/auto."

to

"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)."

What do you think?  I know I tend to write more verbose error messages,
but I just don't want to encourage people to shoot themselves in the
foot.  If you can think of a better way to convey the message, that'd be
great.  Maybe we should just say "don't delete the symlinks in the auto
directory"?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-12-09 22:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08 10:53 About /var/guix/profiles and guix pull generations Pierre Neidhardt
2018-12-09  4:35 ` Chris Marusich
2018-12-09 12:40   ` Pierre Neidhardt
2018-12-09 12:40     ` Pierre Neidhardt
2018-12-09 13:38       ` Pierre Neidhardt
2018-12-09 22:21         ` Chris Marusich [this message]
2018-12-10  8:22           ` Pierre Neidhardt
2018-12-17  9:12             ` Pierre Neidhardt
2018-12-19  2:48             ` Chris Marusich
2018-12-19  7:49               ` Pierre Neidhardt
2018-12-19 16:16                 ` Chris Marusich
2018-12-19 16:28                   ` Pierre Neidhardt
2018-12-19 16:31                     ` Pierre Neidhardt
2018-12-19 16:49                       ` Pierre Neidhardt
2018-12-25 17:51                         ` swedebugia
2018-12-25 18:49                           ` Pierre Neidhardt
2018-12-26  0:09                             ` swedebugia
2020-05-20  8:26                         ` Pierre Neidhardt
2018-12-19 13:49         ` GC hints Ludovic Courtès
2018-12-19 14:31           ` Pierre Neidhardt
2018-12-19 14:49           ` Ricardo Wurmus
2018-12-19 16:25           ` Chris Marusich
2018-12-20 12:12           ` Mark H Weaver
2018-12-20 20:03             ` Alex Kost
2018-12-21  8:30             ` Chris Marusich
2018-12-21  8:47               ` swedebugia
2018-12-23 15:58               ` Mark H Weaver
2018-12-25 12:05                 ` swedebugia
2018-12-25 14:00                   ` Pierre Neidhardt
2019-01-08 22:27                 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lg4yz6gz.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).