unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Vincent Legoll <vincent.legoll@gmail.com>
To: Alex Kost <alezost@gmail.com>, ericbavier@openmailbox.org
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Reverse dependencies
Date: Fri, 12 Aug 2016 11:27:40 +0200	[thread overview]
Message-ID: <CAEwRq=oZAtruL+COJh0_NPiN8TWoO_n8u14naUQBtayfUeJnew@mail.gmail.com> (raw)
In-Reply-To: <87d1legy06.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

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

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

I'm trying Eric's suggestion (thanks Eric), and that seems to do 1, I need
a way to modify it to do the other 2... (see the attached script)

WDYT ?

-- 
Vincent Legoll

[-- Attachment #2: revdep.scm --]
[-- Type: text/x-scheme, Size: 1957 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright <C2><A9> 2016 Vincent Legoll <vincent.legoll@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(use-modules (guix packages)
             (gnu packages)
             (srfi srfi-1)
             (srfi srfi-26)
             (ice-9 getopt-long))
 	
(define (revdep pkg)
  (fold-packages
    (lambda (package _)
      (when (any (cut eq? <> (specification->package pkg))
                 (map second (package-direct-inputs package)))
        (format #t "~a depends on ~a~%"
                (package-full-name package) pkg)))
    #t))

(define (main args)
  (let* ((option-spec '((version (single-char #\v) (value #f))
                        (help    (single-char #\h) (value #f))))
         (options (getopt-long args option-spec))
         (help-wanted (option-ref options 'help #f))
         (version-wanted (option-ref options 'version #f))
         (pkgs (option-ref options '() #f)))
    (if (or version-wanted help-wanted)
        (begin
          (if version-wanted
              (display "revdep.scm version 0.1\n"))
          (if help-wanted
              (display "\
revdev.scm [options|package names]
  -v, --version    Display version
  -h, --help       Display this help\n")))
        (map revdep pkgs))))

(main (command-line))

  reply	other threads:[~2016-08-12 14:39 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
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 [this message]
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='CAEwRq=oZAtruL+COJh0_NPiN8TWoO_n8u14naUQBtayfUeJnew@mail.gmail.com' \
    --to=vincent.legoll@gmail.com \
    --cc=alezost@gmail.com \
    --cc=ericbavier@openmailbox.org \
    --cc=help-guix@gnu.org \
    /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).