[Top][All Lists]

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

Re: Reverse dependencies

From: Chris Marusich
Subject: Re: Reverse dependencies
Date: Fri, 12 Aug 2016 09:36:48 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Bavier <address@hidden> writes:

> On 2016-08-12 11:24, Chris Marusich wrote:
>> Eric Bavier <address@hidden> writes:
>>> On 2016-08-11 09:43, Vincent Legoll wrote:
>>>> Hello,
>>>>>> I'm trying to understand which package(s) depends on some other
>>>>>> package,
>>>>>> kind of the reverse of what guix graph does (I think).
>>>>> I think that `guix refresh --list-dependent foo` is what you are
>>>>> asking
>>>>> for, or at least it's close. We use it to learn what will need to be
>>>>> rebuilt when upgrading foo.
>>>> Not really what I want to know:
>>>> # guix refresh --list-dependent inkscape
>>>> Building the following 5 packages would ensure 10 dependent packages
>>>> are rebuilt: frescobaldi-2.19.0 solfege-3.22.2 simple-scan-3.19.91
>>>> termite-11 hydra-20150407.4c0e3e4
>>>> None of those are installed, but inkscape is pulled in by something
>>>> which I want to know
>>>> Is there no other way to get that information ?
>>> Something like (mildly tested):
>>> (use-modules (guix packages)
>>>              (gnu packages)
>>>              (gnu packages inkscape)
>>>              (srfi srfi-1)
>>>              (srfi srfi-26))
>>> (fold-packages
>>>   (lambda (package _)
>>>     (when (any (cut eq? <> inkscape)
>>>                (map second (package-direct-inputs package)))
>>>       (format #t "~a depends on inkscape~%"
>>>               (package-full-name package))))
>>>   #t)
>>> which, when run, results in:
>>> "dblatex-0.3.5 depends on inkscape"
>> The 'guix graph' command has the ability to print out references,
>> but my
>> understanding is that because these are the references which result
>> from
>> Nix's scan of the output store path, these references will only be
>> runtime dependencies (see '(guix) Invoking guix graph' in the manual).
> This is not completely accurate.  'guix graph's '--type' argument can
> be used to display different node types.  The 'references' type
> corresponds to run-time dependencies.

I see!  Thank you for the additional information.


Attachment: signature.asc
Description: PGP signature

reply via email to

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