From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: inputs vs. native-inputs vs. propagated-inputs Date: Sat, 18 Jun 2016 21:24:06 +0200 Message-ID: <87vb161esp.fsf@gnu.org> References: <575D2646.6030000@crazy-compilers.com> <877fdur38e.fsf@member.fsf.org> <575D84C5.5090307@crazy-compilers.com> <20160612195328.GB1615@jasmine> <57646277.4020400@crazy-compilers.com> <20160617233433.GA10924@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bELqp-0005dm-1B for help-guix@gnu.org; Sat, 18 Jun 2016 15:24:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bELqj-0003yH-RA for help-guix@gnu.org; Sat, 18 Jun 2016 15:24:12 -0400 In-Reply-To: <20160617233433.GA10924@jasmine> (Leo Famulari's message of "Fri, 17 Jun 2016 19:34:33 -0400") 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: Leo Famulari Cc: Hartmut Goebel , help-guix Leo Famulari skribis: > I _think_ that `gc --references` works by querying the database for a > list of references in the store item you give it as an argument. I think > that the information in the database is created after building, by > scanning the files of the package's output in /gnu/store, looking for > strings that appear to be paths in /gnu/store. I say "I think" because I > am not sure. I don't understand that part of the code very well yet. That=E2=80=99s 100% correct! :-) Namely, =E2=80=98guix gc --references=E2= =80=99 makes an RPC to the daemon, which then looks things up in the database (see the =E2=80=98Re= fs=E2=80=99 table in nix/libstore/schema.sql.) Scanning for references indeed happens at the end of a successful build, in =E2=80=98scanForReferences=E2=80=99 in libstore/references.cc. Since sc= anning is expensive (I/O-intensive), the result is stored in the database. Ludo=E2=80=99.