Subject: failure of `guix graph --type=bag-emerged hello`
From: Leo Famulari <[email-masked]>
To: [email-masked]
Date: Fri, 1 Jan 2016 18:06:44 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

When attempting `guix graph --type=bag-emerged hello`, the program
crashes and produces a backtrace.

I am using an up-to-date Guix on Debian Stretch.

$ uname -a
Linux jasmine 4.3.0-1-amd64 #1 SMP Debian 4.3.3-2 (2015-12-17) x86_64 GNU/Linux

Here is the full output of the command invocation:

;;; note: source file /home/leo/pkgs/leo/packages/borg.scm
;;;       newer than compiled /home/leo/.cache/guile/ccache/2.0-LE-8-2.0/home/leo/work/pkgs/leo/packages/borg.scm.go
;;; note: source file /home/leo/pkgs/leo/packages/ddar.scm
;;;       newer than compiled /home/leo/.cache/guile/ccache/2.0-LE-8-2.0/home/leo/work/pkgs/leo/packages/ddar.scm.go
digraph "Guix bag-emerged" {
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" [label = "hello-2.10", shape = box, fontname = Helvetica];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/fighqx3qn58f4kzs957zy40axbyq1rp9-hello-2.10.tar.gz.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/al3z0qyj1jg7s0j53cbmdnzis2q1qkzv-tar-1.28.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/8xqlzrg2gv9saqq77zlxzgq34yj3il1v-gzip-1.6.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/0dlz07rdvvl5ii16gbks1j5jd334g20b-bzip2-1.0.6.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/gq2118sa24fglpi023wfx04570bx36hv-xz-5.0.4.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/c8kp50w8j5z6dya08kxgmj56b9m37l51-file-5.22.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/ja8pgg14zprdzjlrkga8mv3dmiv3bx9m-diffutils-3.3.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/0c38rgzbhvzwb2z4zq4200b3n8pdghsi-patch-2.7.5.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/hcccb1xi5xhqkzjy4im9vigii16pl4d0-sed-4.2.2.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/xq3k5hc1ginpn7wy0n5ifh79nmh5fmvc-findutils-4.4.2.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/nnmad3s5p1smizqd92vwbzj0f6rxk70w-gawk-4.1.3.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/ph732mz4gmy3j1fir2aygwl8w6vpj4ak-grep-2.21.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/nc28660wl2wjqch09lfnq63xlrcy9pk6-coreutils-8.24.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/ky80kk7lqm6s1w2i3bammal2mxsl7j7r-make-4.1.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/ldnsawbw8va4j7nhda7lb1hkvxm0w69q-bash-4.3.39.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/id5cfnyfk99qwd2i9mccq0mg6awk8m91-ld-wrapper-0.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/vh5nil1s5pss0nhvzg4dypr3k6cvsj72-binutils-2.25.1.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/972yibayx2vzs9lfynwj9baz0b27nbjs-gcc-4.9.3.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/qy66yjqpnxb6p6nawfzvqyx7fs1qn25v-glibc-2.22.drv" [color = red];
  "/gnu/store/17n7nhssy98idxcs4zgs7aprfd3f7w7z-hello-2.10.drv" -> "/gnu/store/25li3mnn7dr4cds9g95yj0ny5sxjhpkk-glibc-utf8-locales-2.22.drv" [color = red];
Backtrace:
In unknown file:
   ?: 19 [apply-smob/1 #<catch-closure 108c6a0>]
In ice-9/boot-9.scm:
  63: 18 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 17 [eval # #]
In ice-9/boot-9.scm:
2401: 16 [save-module-excursion #<procedure 10a9940 at ice-9/boot-9.scm:4045:3 ()>]
4050: 15 [#<procedure 10a9940 at ice-9/boot-9.scm:4045:3 ()>]
1724: 14 [%start-stack load-stack ...]
1729: 13 [#<procedure 10c1ea0 ()>]
In unknown file:
   ?: 12 [primitive-load "/gnu/store/n3jn19gckk3pim8jr53yxvdll3m77gw9-guix-0.9.0.43c082b/bin/.guix-real"]
In guix/ui.scm:
1175: 11 [run-guix-command graph "--type=bag-emerged" "hello"]
In guix/scripts/graph.scm:
 340: 10 [guix-graph "--type=bag-emerged" "hello"]
In ice-9/boot-9.scm:
 157: 9 [catch srfi-34 #<procedure 2014ae0 at guix/ui.scm:411:2 ()> ...]
 157: 8 [catch system-error ...]
In guix/scripts/graph.scm:
 352: 7 [#<procedure 2014b00 at guix/scripts/graph.scm:340:2 ()>]
In guix/store.scm:
1061: 6 [run-with-store # ...]
In guix/graph.scm:
 174: 5 [#<procedure 475af00 at guix/graph.scm:174:19 (state)> #]
In guix/monads.scm:
 286: 4 [mapm # #<procedure bag-node-identifier (thing)> #]
 276: 3 [loop (#f) ()]
 288: 2 [#<procedure 43ab3f0 at guix/monads.scm:287:30 (item result)> #f ()]
In guix/scripts/graph.scm:
 103: 1 [bag-node-identifier #f]
In unknown file:
   ?: 0 [#f #f "x86_64-linux" #f]

ERROR: In procedure #f:
ERROR: Wrong type to apply: #f