guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: store reference detection (was Re: JARs and reference scanning)


From: Chris Marusich
Subject: Re: store reference detection (was Re: JARs and reference scanning)
Date: Tue, 23 May 2017 00:29:48 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hartmut Goebel <address@hidden> writes:

> Am 12.05.2017 um 23:51 schrieb Mark H Weaver:
>> What's the motivation for this proposal, if not to allow the scanner to
>> see references that would otherwise be obfuscated?
> The motivation is to have references at all. See
> <http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00639.html> for
> an example of a package having propagated inputs which are not
> recognized as references by the gc.

Hartmut, the question of whether or not a "package" (actually, the store
paths created by building the package) is eligible for garbage
collection has little to do with whether or not the package is a
propagated input.  With that in mind, the example you provided does not
seem to be a problem.

If a package A happens to be a propagated input of another package B,
and if package B happens to be installed in some profile (e.g., via
'guix package -i B'), then package A is also installed in the same
profile.  Therefore, package A is not eligible for garbage collection
(i.e., it is "live") because every profile is a GC root.  However, if
one has just built package B with 'guix build B' without installing it
into any profile, then package A hasn't been installed, either.  In this
case, package A is eligible for garbage collection because no GC root
refers to it directly or transitively [1].

To summarize: When package A is a propagated input of package B, it is
possible for package A to be live, and it is possible for package A not
to be live.  By itself, the fact that package A is a propagated input
tells us nothing about whether or not package A should be eligible for
garbage collection.  And it is not the case that package A should be
live simply because package B has been built.

[1] This assumes, of course, that package A wasn't live to begin with.

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]