From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Reverse dependencies Date: Fri, 12 Aug 2016 09:24:11 -0700 Message-ID: <87fuqa3qhg.fsf@gmail.com> References: <20160716161333.GA29212@jasmine> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYFFr-0005GH-Fu for help-guix@gnu.org; Fri, 12 Aug 2016 12:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYFFp-0004yK-9O for help-guix@gnu.org; Fri, 12 Aug 2016 12:24:18 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:33121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYFFo-0004xe-Uc for help-guix@gnu.org; Fri, 12 Aug 2016 12:24:17 -0400 Received: by mail-pa0-x230.google.com with SMTP id ti13so10009943pac.0 for ; Fri, 12 Aug 2016 09:24:16 -0700 (PDT) In-Reply-To: (Eric Bavier's message of "Thu, 11 Aug 2016 14:13:04 -0500") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Eric Bavier Cc: help-guix --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric Bavier 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). The 'guix gc' command has the ability to print out 'referrers', which might also be useful. See '(guix) Invoking guix gc' for details. This will show you components that refer to the specified store path. I also hear that the Nix daemon can be configured to maintain a database of derivers, which would let you find out which derivation generated a given store path. I don't know if Guix enables this by default. If it's enabled, then you could potentially investigate the derivation which generated a store path (e.g., to see if the derivation references inkscape), but I don't know of any automated tools for investigating that stuff today. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXrfgsAAoJEN1AmhXYIkadIMcP/i+Xc3p9rzaycPthhhTwc3cx elRgsg4RKrZGgDks2D40qhClTD7EODg2ODcT5RKTQseBq6hBF2ThdF3szFwcA0Mv cXrrIMnTOjan5CQ1w+4juKKPiAYFD/7fH9BSsFae805gqK8RoH6nBfz1sOEDJBsC RlLD7dw9PESIAzAWe/xOibqdNtcgmDNnhQRPOUPCr9KWiYG4fEvPw0eXl7/lYO5q gMoqX2Z+QJVY0GXdgVaXeItKAdhdb/bB3TVDsAm1p6D+zEOI6JNMKjoJu0JDMV7v 87x8YoOZtLpZqM4HQdyKoTi+FjtvUjSg7hL6L45V6OIhaz76R/lQLevUQKzrsmMd wI8758TASXSki27vWlSuDtMtxRG+F5a74HpjmCrF02P91CPfl09zftAA2xvgAzAh 67N2j2j7PRYhN776/Bzm7ZHo+VvuvskJ77dMBZOHHOE1IzysvAFU0ujZNyJjtP9P KMzAfc9YXy8MC82lwp22byA+ayqUy/0UIvLft6Aal2UgyvU1dZvJECIQAh6eh3nH kYcyszpo6HCGD37SqKv+AVo6OayVJAeGj+81H01GGI3CTqPsgAyA6shBxXHZsrM8 JnP7ysVqrr2LSp8Dv+d6efRWwkgXhPWtEGqLsY2OFOBnmmXXQ82yV8gVv0Dplp93 iIqhD6/nIeqX5VTrCDYI =zTJT -----END PGP SIGNATURE----- --=-=-=--