From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: About /var/guix/profiles and guix pull generations Date: Sun, 09 Dec 2018 14:21:48 -0800 Message-ID: <87lg4yz6gz.fsf@gmail.com> References: <878t10xpam.fsf@ambrevar.xyz> <87wooj1fmx.fsf@gmail.com> <87efaqna9u.fsf@ambrevar.xyz> <87d0qana9e.fsf@ambrevar.xyz> <87k1kivmzt.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW7SZ-0005X3-5T for help-guix@gnu.org; Sun, 09 Dec 2018 17:22:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW7SV-0005sw-Sp for help-guix@gnu.org; Sun, 09 Dec 2018 17:21:59 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:43481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gW7SV-0005si-Lp for help-guix@gnu.org; Sun, 09 Dec 2018 17:21:55 -0500 Received: by mail-pl1-x62f.google.com with SMTP id gn14so4268197plb.10 for ; Sun, 09 Dec 2018 14:21:55 -0800 (PST) In-Reply-To: <87k1kivmzt.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 09 Dec 2018 14:38:30 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: help-guix --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Pierre, Awesome, thank you for the patch! Pierre Neidhardt writes: > -generations and collecting garbage, along these lines: > +generations, deleting old Guix checkouts and collecting garbage, along t= hese > +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=3D1m > -guix gc > -@end example\n") > - profile)) > +guix package --profile=3D~s --delete-generations=3D1m > +guix package --profile=3D~s --delete-generations=3D1m > +guix gc --free-space=3D5G > +@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=3D/tmp/myprofile -i coreutils you will get the following symlink structure: =2D-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-l= ink lrwxrwxrwx 1 marusich users 51 Dec 9 13:56 /tmp/myprofile-1-link -> /gnu/s= tore/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 $=20 =2D-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"? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlwNlXwACgkQ3UCaFdgi Rp2PpA/+MCgZlqsE71xD4J8w8eDpooZMp4tOfJGADCj0FiWhd22EI4oYcGflqaTV GD/3k+RqYJnVFt1ZLo+bRSFt0JguY7RPo7mX0uriXWGoKAJN7HO4HuQDdNdNHzW3 Udacb/FQ9H8ROUaLoXCPH5FMOC7LUsi5yurLrMJPF9hiSglNpJtXHtsX0CDgOJPd DjXzxTvz51SkLph97fJQ0oEAjU0joOZTwg3S85xL8Fs3r9NDqSdMr+vtKwrLNpUJ PsvS4kTR7U9JkeiileJSmtJbfFGbLeZ+83dlihxsgLsgGdzlgM4qyTr8k8ukhKfu 1F/fIWwOnY/YY3I69/8vkdpKjKa9IWR2jUVOCAwrYdTmFSigm7LElPi3/NjRd9S7 +5MPVy6pfpNbDQbkQb+LdxdOWesrEhMAcOmUYtk9lMOoNOH5xAQXf9yrnTFZwXSF xmN5nU/nVHAVe2f7psD2q8iQNWDjW/dQBWwWCGfkCOyootulTBIgNNwuZmkJ9fPF uu0ATjxwvsz1tbH+CiF4HiW0o8S87OaUYuwHo/SgdqPk2PvXzIQBChwdCn/TKQUr MWo0U4YzHpAL0V3UJhlTvl3Eijc+GdnZWXc88W1ShIJemSul4UkdZM0A1cZfMycP X+wUMARAg/0O/99g61Y8fMo8zok0KqpH+rK5nH1fPBwFnV+ycPA= =PAhe -----END PGP SIGNATURE----- --=-=-=--