unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32749: package-with-explicit-inputs leaks-in additional inputs
@ 2018-09-17 10:03 Jan Nieuwenhuizen
  2018-09-17 15:59 ` Jan Nieuwenhuizen
  2018-09-17 20:26 ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2018-09-17 10:03 UTC (permalink / raw)
  To: 32749

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

Hi!

Rewriting the bootstrap on the wip-bootstrap branch I found additional
inputs in packages that use `package-with-explicit-inputs', such as
diffutils-boot0.

I would expect diffutils-boot0 to list just one extra input in addition
to gnu-make-boot0; namely the package gnu-make-boot0; however it has
many more.

To reproduce this I created a test file with two simple packages
gnu-make-explicit-inputs, gnu-make-no-implicit-inputs.

Put the attached file in gnu/packages and producing a graph for both
test packages

--8<---------------cut here---------------start------------->8---
11:56:03 janneke@dundal:~/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 janneke@dundal:~/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
--8<---------------cut here---------------end--------------->8---

Should `package-with-explicit-inputs' behave like I think it does, i.e.,
should both test packages list the same dependencies, or am I missing
something?


[-- Attachment #2: pawei.scm --]
[-- Type: application/octet-stream, Size: 1068 bytes --]

(define-module (gnu packages pawei)
  #:use-module (gnu packages)
  #:use-module (gnu packages bootstrap)
  #:use-module (gnu packages base)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix utils))

(define (%bootstrap-inputs+toolchain)
  %bootstrap-inputs)

(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))))))

[-- Attachment #3: make-no-implicit-inputs.dot --]
[-- Type: application/octet-stream, Size: 1794 bytes --]

digraph "Guix bag" {
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" [label = "make-no-implicit-inputs@4.2.1", shape = box, fontname = Helvetica];
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/1ap76hjkmlwbxpghxhvpqy0npwqknzjl-make-no-implicit-inputs-4.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [label = "glibc-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [label = "gcc-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [label = "binutils-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];

}

[-- Attachment #4: make-explicit-inputs.dot --]
[-- Type: application/octet-stream, Size: 11841 bytes --]

digraph "Guix bag" {
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" [label = "make-explicit-inputs@4.2.1", shape = box, fontname = Helvetica];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkviolet];
  "/gnu/store/p7n9sjhjdvx6a5lxijlhvj9c24an5xiw-make-explicit-inputs-4.2.1.drv" -> "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" [color = darkviolet];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" [label = "pkg-config@0.29.2", shape = box, fontname = Helvetica];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkviolet];
  "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkviolet];
  "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [label = "glibc-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [label = "gcc-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkviolet];
  "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [label = "binutils-bootstrap@0", shape = box, fontname = Helvetica];
  "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" [label = "guile@2.0.14", shape = box, fontname = Helvetica];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" [color = darkgoldenrod];
  "/gnu/store/0ik9ci926qdczd0h8c005yf9pvrm1p1p-guile-2.0.14.drv" -> "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" [color = darkgoldenrod];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" [label = "libffi@3.2.1", shape = box, fontname = Helvetica];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/sah1x0ai95vsgawyy7q2740kjgd0jd1v-libffi-3.2.1.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" [label = "libunistring@0.9.9", shape = box, fontname = Helvetica];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = cyan3];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = cyan3];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = cyan3];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = cyan3];
  "/gnu/store/9f92i60npmm274nrgx6wwak7h924ii6j-libunistring-0.9.9.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = cyan3];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" [label = "libltdl@2.4.6", shape = box, fontname = Helvetica];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = red];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = red];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = red];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = red];
  "/gnu/store/6f21dlw6d3qh7wlpzhlkhsh8vf92r0di-libltdl-2.4.6.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = red];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" [label = "libgc@7.6.4", shape = box, fontname = Helvetica];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/43v9krsljmb2yw0xx8ad1inb77wvw754-pkg-config-0.29.2.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = darkgoldenrod];
  "/gnu/store/645iy063f15kg0a12zkpxvhvzjxcb8xc-libgc-7.6.4.drv" -> "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" [color = darkgoldenrod];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" [label = "libatomic-ops@7.6.4", shape = box, fontname = Helvetica];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = blue];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = blue];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = blue];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = blue];
  "/gnu/store/v8aldbz9fw25pbb5l0iipg07s6l83ybb-libatomic-ops-7.6.4.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = blue];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" [label = "gmp@6.1.2", shape = box, fontname = Helvetica];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" [color = peachpuff4];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = peachpuff4];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = peachpuff4];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = peachpuff4];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = peachpuff4];
  "/gnu/store/34v3z1l51zbwm08l5f5zpn52nzwv55xc-gmp-6.1.2.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = peachpuff4];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" [label = "m4@1.4.18", shape = box, fontname = Helvetica];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" -> "/gnu/store/p4ws9y0vk1l32zh8jmivp0q1hbvl1j3g-glibc-bootstrap-0.drv" [color = magenta];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" -> "/gnu/store/4284bzg20ndx1l4siydl65l36c0mxmqn-gcc-bootstrap-0.drv" [color = magenta];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" -> "/gnu/store/3mjf4hrs78zlk515098arhd9yhphqd55-binutils-bootstrap-0.drv" [color = magenta];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = magenta];
  "/gnu/store/rv1r9rpkkjvnnyv0f53kac3pr6azrld0-m4-1.4.18.drv" -> "/gnu/store/kx26qxgz3c0dmrc21rn6rg8cviham7cn-bootstrap-binaries-0.drv" [color = magenta];

}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-17 10:03 bug#32749: package-with-explicit-inputs leaks-in additional inputs Jan Nieuwenhuizen
@ 2018-09-17 15:59 ` Jan Nieuwenhuizen
  2018-09-17 20:26 ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2018-09-17 15:59 UTC (permalink / raw)
  To: 32749

Jan Nieuwenhuizen writes:

> Should `package-with-explicit-inputs' behave like I think it does, i.e.,
> should both test packages list the same dependencies, or am I missing
> something?

Printing the packages in the Guix Repl gives this result

--8<---------------cut here---------------start------------->8---
(package-inputs gnu-make-no-implicit-inputs)
$12 = (("libc" #<package glibc-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39cc0>) ("gcc" #<package gcc-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39c00>) ("binutils" #<package binutils-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39b40>) ("coreutils&co" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3f39a80>) ("bash" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3f39a80>))
scheme@(gnu packages pawei)> (map car (package-inputs gnu-make-no-implicit-inputs))
$13 = ("libc" "gcc" "binutils" "coreutils&co" "bash")
scheme@(gnu packages pawei)> (package-native-inputs gnu-make-no-implicit-inputs)
$14 = ()
scheme@(gnu packages pawei)> (package-propagated-inputs gnu-make-no-implicit-inputs)
$15 = ()
scheme@(gnu packages pawei)> (package-inputs gnu-make-explicit-inputs)
$16 = (("libc" #<package glibc-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39cc0>) ("gcc" #<package gcc-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39c00>) ("binutils" #<package binutils-bootstrap@0 gnu/packages/bootstrap.scm:150 3f39b40>) ("coreutils&co" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3f39a80>) ("bash" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3f39a80>) ("guile" #<package guile@2.0.14 gnu/packages/bootstrap.scm:150 3f39900>))
scheme@(gnu packages pawei)> 
$17 = (("pkg-config" #<package pkg-config@0.29.2 gnu/packages/bootstrap.scm:150 3f39780>))
scheme@(gnu packages pawei)> (package-propagated-inputs gnu-make-explicit-inputs)
$18 = ()
scheme@(gnu packages pawei)> (package-native-inputs gnu-make-explicit-inputs)
$19 = (("pkg-config" #<package pkg-config@0.29.2 gnu/packages/bootstrap.scm:150 3f39780>))
--8<---------------cut here---------------end--------------->8---

which is exactly what I expect to see when I read the Guile code for the
package descriptions; but is still a bit surprising to me: where do all
the extra inputs come from in the graph?

janneke

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-17 10:03 bug#32749: package-with-explicit-inputs leaks-in additional inputs Jan Nieuwenhuizen
  2018-09-17 15:59 ` Jan Nieuwenhuizen
@ 2018-09-17 20:26 ` Ludovic Courtès
  2018-09-18  4:23   ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-09-17 20:26 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 32749

Hello!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> 11:56:03 janneke@dundal:~/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 janneke@dundal:~/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 glibc-bootstrap@0 gnu/packages/bootstrap.scm:150 3d216c0>) ("gcc" #<package gcc-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21600>) ("binutils" #<package binutils-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21540>) ("coreutils&co" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("bash" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("guile" #<package guile@2.0.14 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’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-17 20:26 ` Ludovic Courtès
@ 2018-09-18  4:23   ` Jan Nieuwenhuizen
  2018-09-18 14:38     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2018-09-18  4:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32749

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@0 gnu/packages/bootstrap.scm:150 3d216c0>) ("gcc" #<package gcc-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21600>) ("binutils" #<package binutils-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21540>) ("coreutils&co" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("bash" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("guile" #<package guile@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-18  4:23   ` Jan Nieuwenhuizen
@ 2018-09-18 14:38     ` Ludovic Courtès
  2018-09-18 15:03       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2018-09-18 14:38 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 32749

Hello,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> 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@0 gnu/packages/bootstrap.scm:150 3d216c0>) ("gcc" #<package gcc-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21600>) ("binutils" #<package binutils-bootstrap@0 gnu/packages/bootstrap.scm:150 3d21540>) ("coreutils&co" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("bash" #<package bootstrap-binaries@0 gnu/packages/bootstrap.scm:150 3d21480>) ("guile" #<package guile@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.

Ah, true!

> That can be fixed by repeating the explicit inputs, like this:
>
> (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))))))
>
> ...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?

The key thing is that ‘package-with-explicit-inputs’ works recursively:
it adds (it does *not* replace) inputs to the whole package graph.

> 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?

Consider this:

  (define x
    (let ((p (package-with-explicit-inputs gnu-make
                                           (%bootstrap-inputs+toolchain)
                                           …)))
      …))

Here ‘%bootstrap-inputs+toolchain’ is called from the top level, when
‘%current-system’ has its default value.  So if you’re on x86_64, you
get the x86_64 inputs.

So it’s not a bug per se, but it’s definitely an annoyance.

I just realized that there’s already a fix for this, which is to pass
‘package-with-explicit-inputs’ a procedure rather than the input list,
like this:

  (package-with-explicit-inputs gnu-make
                                %bootstrap-inputs+toolchain
                                …)

Does it work for you?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-18 14:38     ` Ludovic Courtès
@ 2018-09-18 15:03       ` Jan Nieuwenhuizen
  2018-09-19 20:42         ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2018-09-18 15:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32749

Ludovic Courtès writes:

>> I tried this!  The dependencies look OK, but the package won't build --
>> there's no tar, make etc.
>
> Ah, true!
>
>> ...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?
>
> The key thing is that ‘package-with-explicit-inputs’ works recursively:
> it adds (it does *not* replace) inputs to the whole package graph.

Ah, cool!

> Consider this:
>
>   (define x
>     (let ((p (package-with-explicit-inputs gnu-make
>                                            (%bootstrap-inputs+toolchain)
>                                            …)))
>       …))
>
> Here ‘%bootstrap-inputs+toolchain’ is called from the top level, when
> ‘%current-system’ has its default value.  So if you’re on x86_64, you
> get the x86_64 inputs.

Doh'!  The let is at toplevel...yeah that makes sense.

> So it’s not a bug per se, but it’s definitely an annoyance.

I agree, indeed it's rather a problem of interaction between
--system/(%current-system).

> I just realized that there’s already a fix for this, which is to pass
> ‘package-with-explicit-inputs’ a procedure rather than the input list,
> like this:
>
>   (package-with-explicit-inputs gnu-make
>                                 %bootstrap-inputs+toolchain
>                                 …)
>
> Does it work for you?

Yes!  I'm reverting my `...leak' commits and create thunks as input of
package-with-explicit-inputs.  Thanks!

janneke

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32749: package-with-explicit-inputs leaks-in additional inputs
  2018-09-18 15:03       ` Jan Nieuwenhuizen
@ 2018-09-19 20:42         ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-09-19 20:42 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 32749-done

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> Ludovic Courtès writes:

[...]

>> I just realized that there’s already a fix for this, which is to pass
>> ‘package-with-explicit-inputs’ a procedure rather than the input list,
>> like this:
>>
>>   (package-with-explicit-inputs gnu-make
>>                                 %bootstrap-inputs+toolchain
>>                                 …)
>>
>> Does it work for you?
>
> Yes!  I'm reverting my `...leak' commits and create thunks as input of
> package-with-explicit-inputs.  Thanks!

Awesome, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-19 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 10:03 bug#32749: package-with-explicit-inputs leaks-in additional inputs Jan Nieuwenhuizen
2018-09-17 15:59 ` Jan Nieuwenhuizen
2018-09-17 20:26 ` Ludovic Courtès
2018-09-18  4:23   ` Jan Nieuwenhuizen
2018-09-18 14:38     ` Ludovic Courtès
2018-09-18 15:03       ` Jan Nieuwenhuizen
2018-09-19 20:42         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).