From: Lukas Gradl <lgradl@openmailbox.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Hartmut Goebel <h.goebel@crazy-compilers.com>,
help-guix <help-guix@gnu.org>
Subject: Re: inputs vs. native-inputs vs. propagated-inputs
Date: Tue, 21 Jun 2016 08:37:27 -0500 [thread overview]
Message-ID: <87ziqe8xyg.fsf@openmailbox.org> (raw)
In-Reply-To: <87d1nd1ef5.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 19 Jun 2016 15:44:30 +0200")
ludo@gnu.org (Ludovic Courtès) writes:
> Lukas Gradl <lgradl@openmailbox.org> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> Leo Famulari <leo@famulari.name> 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’s 100% correct! :-) Namely, ‘guix gc --references’ makes an RPC to
>>> the daemon, which then looks things up in the database (see the ‘Refs’
>>> table in nix/libstore/schema.sql.)
>>>
>>> Scanning for references indeed happens at the end of a successful build,
>>> in ‘scanForReferences’ 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?
>
> The “references” of a store item are its run-time dependencies, a subset
> of the ‘inputs’ etc. fields, which are themselves the compile-time
> dependencies.
>
> If those run-time dependencies were not inferred automatically by the
> daemon, we’d have to maintain them individually, and this would be
> error-prone and imprecise.
>
> Run-time dependency information is what allows Guix to know which
> substitutes need to be downloaded when installing from substitutes, and
> it’s what allows the garbage collector to determine which store items
> are “live”, and which ones are not.
>
OK, Thank you for the explanation, this makes more sense to me now!
Best,
Lukas
next prev parent reply other threads:[~2016-06-21 13:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 9:07 inputs vs. native-inputs vs. propagated-inputs Hartmut Goebel
2016-06-12 12:38 ` 宋文武
2016-06-12 15:50 ` Hartmut Goebel
2016-06-12 19:53 ` Leo Famulari
2016-06-17 20:49 ` Hartmut Goebel
2016-06-17 23:34 ` Leo Famulari
2016-06-18 19:24 ` Ludovic Courtès
2016-06-19 3:57 ` Lukas Gradl
2016-06-19 13:44 ` Ludovic Courtès
2016-06-21 13:37 ` Lukas Gradl [this message]
2016-07-10 21:23 ` Chris Marusich
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziqe8xyg.fsf@openmailbox.org \
--to=lgradl@openmailbox.org \
--cc=h.goebel@crazy-compilers.com \
--cc=help-guix@gnu.org \
--cc=ludo@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.