From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: Re: inputs vs. native-inputs vs. propagated-inputs Date: Sat, 18 Jun 2016 22:57:56 -0500 Message-ID: <87vb15n83f.fsf@openmailbox.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> <87vb161esp.fsf@gnu.org> 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]:50220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bETsE-0002hS-84 for help-guix@gnu.org; Sat, 18 Jun 2016 23:58:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bETs9-0005UD-4e for help-guix@gnu.org; Sat, 18 Jun 2016 23:58:13 -0400 In-Reply-To: <87vb161esp.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 18 Jun 2016 21:24:06 +0200") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Hartmut Goebel , help-guix ludo@gnu.org (Ludovic Court=C3=A8s) writes: > 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=98= Refs=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 = scanning is > expensive (I/O-intensive), the result is stored in the database. Sorry, this might be a dumb question, I don't quite understand the concept of these references. Why are references important? Shouldn't every store item know which other store-items are related to it from the "inputs"-field in its definition? Why is it necessary to keep track of the references? Thank you!