From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix-gc Date: Tue, 22 Jan 2013 22:56:57 +0100 Message-ID: <87r4lc51au.fsf@gnu.org> References: <8738yfp4j7.fsf@gnu.org> <201301101104.22164.andreas@enge.fr> <87hampi53a.fsf@gnu.org> <201301191400.38491.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Txlq3-0005RX-3R for bug-guix@gnu.org; Tue, 22 Jan 2013 16:57:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Txlq0-0004G1-UL for bug-guix@gnu.org; Tue, 22 Jan 2013 16:57:03 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:12172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Txlq0-0004Fo-NV for bug-guix@gnu.org; Tue, 22 Jan 2013 16:57:00 -0500 In-Reply-To: <201301191400.38491.andreas@enge.fr> (Andreas Enge's message of "Sat, 19 Jan 2013 14:00:38 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Donnerstag, 10. Januar 2013 schrieb Ludovic Court=C3=A8s: >> Nix provides other options that extend this model to something closer to >> what you say, namely =E2=80=98gc-keep-outputs=E2=80=99 (see >> .) >>=20 >> I guess we should add a guix-daemon option for that. > > If I understand the manual correctly, this is not exactly what I meant. I= =20 > thought of simply keeping all packages that are needed to build a simple= =20 > project, such as "hello". Or maybe just keeping gcc, as it takes really=20 > very long to build. But indeed, this is less critical once binary downloa= ds=20 > from a build farm are possible. I=E2=80=99ve actually installed or registered roots for such =E2=80=9Cpreci= ous=E2=80=9D packages, which prevents them from being GC=E2=80=99d. > Another option would be something close to debian's "apt-get autoclean":= =20 > Keep all the packages that are still available in the sense that they wou= ld=20 > be built by calls to "guix-build", looping over the output of "guix-packa= ge=20 > --list-available". For packages that use =E2=80=98gnu-build-system=E2=80=99, the prerequisites= are a superset of (@ (gnu packages base) final-inputs), which includes GCC, Coreutils, libc, etc. So you would want to keep those, I guess, right? OTOH, imagine a hypothetical =E2=80=98python-build-system=E2=80=99, whose o= nly implicit inputs are Python and perhaps Coreutils. Someone who only installs Python packages only cares about keeping Python and Coreutils around. And then, the GC. The GC only sees derivations, and derivation outputs. It doesn=E2=80=99t have the slightest idea of which outputs are valuable to= the user, and which aren=E2=80=99t. So the normal way to address this problem is to tell the GC what=E2=80=99s important: by installing packages, or by running =E2=80=98guix-build --root= =E2=80=99. The Nix daemon options I mentioned above can be used to do something more: keeping the source tarballs of derivations whose outputs are still present. But as you note, all this will be much less of a concern when we can download pre-built binaries. Something to get in for 0.2, I guess. :-) WDYT? Ludo=E2=80=99.