bug-guix
[Top][All Lists]
Advanced

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

bug#32749: package-with-explicit-inputs leaks-in additional inputs


From: Ludovic Courtès
Subject: bug#32749: package-with-explicit-inputs leaks-in additional inputs
Date: Mon, 17 Sep 2018 22:26:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello!

Jan Nieuwenhuizen <address@hidden> skribis:

> 11:56:03 address@hidden:~/src/guix-master 
> $ ./pre-inst-env guix graph --type=bag -e '(begin (use-modules (guix 
> packages)) (@@ (gnu packages pawei) gnu-make-no-implicit-inputs))' | wc -l
> 14
> 11:56:22 address@hidden:~/src/guix-master 
> $ ./pre-inst-env guix graph --type=bag -e '(begin (use-modules (guix 
> packages)) (@@ (gnu packages pawei) gnu-make-explicit-inputs))' | wc -l
> 79

[...]

> (define gnu-make-no-implicit-inputs
>   (package-with-bootstrap-guile
>    (package (inherit gnu-make)
>             (name "make-no-implicit-inputs")
>             (inputs (%bootstrap-inputs+toolchain))
>             (native-inputs '())
>             (arguments `(#:guile ,%bootstrap-guile
>                          #:implicit-inputs? #f
>                          ,@(package-arguments diffutils))))))
>
> (define gnu-make-explicit-inputs
>   (let ((p (package-with-explicit-inputs gnu-make
>                                          (%bootstrap-inputs+toolchain)
>                                          #:guile %bootstrap-guile)))
>     (package-with-bootstrap-guile
>      (package (inherit p)
>               (name "make-explicit-inputs")
>               (arguments (package-arguments p))))))

The difference comes from the fact that ‘gnu-make-explicit-inputs’ has
Guile in its ‘inputs’:

--8<---------------cut here---------------start------------->8---
scheme@(gnu packages pawei)> (package-direct-inputs gnu-make-explicit-inputs)
$5 = (("libc" #<package address@hidden gnu/packages/bootstrap.scm:150 3d216c0>) 
("gcc" #<package address@hidden gnu/packages/bootstrap.scm:150 3d21600>) 
("binutils" #<package address@hidden gnu/packages/bootstrap.scm:150 3d21540>) 
("coreutils&co" #<package address@hidden gnu/packages/bootstrap.scm:150 
3d21480>) ("bash" #<package address@hidden gnu/packages/bootstrap.scm:150 
3d21480>) ("guile" #<package address@hidden gnu/packages/bootstrap.scm:150 
3d213c0>))
--8<---------------cut here---------------end--------------->8---

This comes from the fact that the ‘inputs’ field is not overridden,
unlike in the case of ‘gnu-make-no-implicit-inputs’.

To solve this, the solution is to add this one ‘inputs’ line:

--8<---------------cut here---------------start------------->8---
(define gnu-make-explicit-inputs
  (let ((p (package-with-explicit-inputs gnu-make
                                         (%bootstrap-inputs+toolchain)
                                         #:guile %bootstrap-guile)))
    (package-with-bootstrap-guile
     (package (inherit p)
              (name "make-explicit-inputs")
              (inputs '())                        ;<- HERE
              (arguments (package-arguments p))))))
--8<---------------cut here---------------end--------------->8---

Perhaps you hit similar cases on ‘wip-bootstrap’?  It’s easy to leave
out too many inputs…

Cheers,
Ludo’.





reply via email to

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