help-guix
[Top][All Lists]
Advanced

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

Re: Reverse dependencies


From: Thompson, David
Subject: Re: Reverse dependencies
Date: Fri, 12 Aug 2016 11:55:26 -0400

On Fri, Aug 12, 2016 at 5:27 AM, Vincent Legoll
<address@hidden> wrote:
> Hello,
>
>> I think you mean inkscape is pulled when you build the system.  Then you
>> will not find it like this.  It is needed to build the fancy grub image,
>> and it is "pulled" by the system building code (specifically by
>> 'svg->png' procedure in (gnu system grub) module).  If you want to avoid
>> it, you can specify an "empty" theme for example:
>>
>>   (bootloader (grub-configuration (device "/dev/sda")
>>                                   (theme (grub-theme))))
>
> Thanks for that information, that was what I wanted to know (both the where
> does it come from, and the how to avoid it being pulled in)
>
> I think a "guix revdep $PKG" should be a valuable tool

While we can certainly make learning about this stuff easier, but
making a new subcommand with a cryptic name just for this purpose
wouldn't be a very good UI.

> it should work:
> 1 - globally in the list of defined packages
> 2 - locally in the list of packages from the current user's profile
> 3 - systemly, from the list of installed packages in the system profile

What do you define "dependencies" to be?  Using your situation as an
example, inkscape is *not* a dependency of the built system, but it is
a dependency of the *derivation* that builds the system.  Using
profiles wouldn't work because profiles may contain references to
store items that the current Guix has no knowledge of.  package
expression -> built package is a one way transformation.  What you can
do, however, is use 'guix gc --referrers' to get a list of store items
that refer to the store item passed in.  This still doesn't help you
in the inkscape case because the built system has no reference to
inkscape, it was just used in the build script.

I think the "right thing" here is to add features to 'guix graph' so
that it can make a referrer graph using the Scheme package graph.
'guix system' has graph subcommands already, so we could add one that
produces a full package dependency graph which would show you who
depends on inkscape.

Any volunteers? :)

I'd also like to point out that you can already use 'guix gc
--referrers /gnu/store/....-foo-1.0' to find out which store items
depend on the one passed in.

- Dave



reply via email to

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