unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Eric Bavier <ericbavier@openmailbox.org>
To: Vincent Legoll <vincent.legoll@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Reverse dependencies
Date: Thu, 11 Aug 2016 14:13:04 -0500	[thread overview]
Message-ID: <e17746408a6934fc2bf8ffce78cf72ef@openmailbox.org> (raw)
In-Reply-To: <CAEwRq=p=Wp+9z13zHPdtKwWDQiaE_OgasbejEbpCF5y+19tByQ@mail.gmail.com>

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"

-- 
`~Eric

  parent reply	other threads:[~2016-08-11 19:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16  9:58 Reverse dependencies Vincent Legoll
2016-07-16 16:13 ` Leo Famulari
2016-08-11 14:43   ` Vincent Legoll
2016-08-11 19:08     ` Patricia J. Hawkins
2016-08-11 19:13     ` Eric Bavier [this message]
2016-08-12 16:24       ` Chris Marusich
2016-08-12 16:30         ` Eric Bavier
2016-08-12 16:36           ` Chris Marusich
2016-08-12  9:03     ` Alex Kost
2016-08-12  9:27       ` Vincent Legoll
2016-08-12 15:55         ` Thompson, David
2016-08-12 16:13           ` Thompson, David
2016-08-13 11:17           ` Vincent Legoll

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e17746408a6934fc2bf8ffce78cf72ef@openmailbox.org \
    --to=ericbavier@openmailbox.org \
    --cc=help-guix@gnu.org \
    --cc=vincent.legoll@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).