GNU bug report logs - #32749
package-with-explicit-inputs leaks-in additional inputs

Previous Next

Package: guix;

Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>

Date: Mon, 17 Sep 2018 10:04:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #14 received at 32749 <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 32749 <at> debbugs.gnu.org
Subject: Re: bug#32749: package-with-explicit-inputs leaks-in additional inputs
Date: Tue, 18 Sep 2018 06:23:44 +0200
Ludovic Courtès writes:

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

Ah, I missed that!

> scheme@(gnu packages pawei)> (package-direct-inputs gnu-make-explicit-inputs)
> $5 = (("libc" #<package glibc-bootstrap <at> 0 gnu/packages/bootstrap.scm:150 3d216c0>) ("gcc" #<package gcc-bootstrap <at> 0 gnu/packages/bootstrap.scm:150 3d21600>) ("binutils" #<package binutils-bootstrap <at> 0 gnu/packages/bootstrap.scm:150 3d21540>) ("coreutils&co" #<package bootstrap-binaries <at> 0 gnu/packages/bootstrap.scm:150 3d21480>) ("bash" #<package bootstrap-binaries <at> 0 gnu/packages/bootstrap.scm:150 3d21480>) ("guile" #<package guile <at> 2.0.14 gnu/packages/bootstrap.scm:150 3d213c0>))
>
> 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:
>
> (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))))))
>
> Perhaps you hit similar cases on ‘wip-bootstrap’?  It’s easy to leave
> out too many inputs…

I tried this!  The dependencies look OK, but the package won't build --
there's no tar, make etc.

That can be fixed by repeating the explicit inputs, like this:

--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 (%bootstrap-inputs+toolchain))
              (native-inputs '())
              (arguments (package-arguments p))))))
--8<---------------cut here---------------end--------------->8---

...but that looks a bit strange: if we have to mention the inputs a
second time the advantage over using the `gnu-make-no-implicit-inputs'
package description becomes real small?

I also tried

     (inputs (package-inputs p))

but that pulls in gcc-bootstrap-0 again; which lead me to believe
`package-with-explicit-inputs' has no observable effect?

Still a bit puzzled whether to revert the rewrites that removed
`package-with-explicit-inputs' and replace them by this second input
repetition...

janneke




This bug report was last modified 6 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.