Subject: bug#31117: eaae07ec2 breaks 'guix pull' for guile 2.0 users

From: Alex Vong <[email-masked]>
Date: Tue, 10 Apr 2018 03:42:59 +0800

Hello Guix,

Commit eaae07ec2878707744fed76029a28ab9a494fc2e breaks 'guix pull' for
guile 2.0 users. More precisely, it fails with:

================================================================================
alexvong1995@debian:~$ guix pull 
Updating from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from Git commit 60e1de6d95bd32b4996c199708541781b8f828fd...
Computing Guix derivation for 'x86_64-linux'... /Backtrace:
           7 (primitive-load "/gnu/store/75vknf0m8z0xdqnbbbms93r94j8…")
In ice-9/boot-9.scm:
    142:2  6 (dynamic-wind _ _ #<procedure 2579b40 at ice-9/eval.scm…>)
In ice-9/eval.scm:
    155:9  5 (_ _)
   191:35  4 (_ _)
   173:47  3 (_ #(#(#<directory (guile-user) 206f140> #<build-da…> …)))
In ./guix/self.scm:
    588:4  2 (guix-derivation "/gnu/store/v6gspcm5462rf6c4rlkcjsyr4…" …)
   575:24  1 (guile-for-build _)
     80:4  0 (_ _)

./guix/self.scm:80:4: Throw to key `match-error' with args `("match" "no matching pattern" "[email-masked]")'.
Backtrace:
In ice-9/boot-9.scm:
 160: 14 [catch #t #<catch-closure 55941ede4160> ...]
In unknown file:
   ?: 13 [apply-smob/1 #<catch-closure 55941ede4160>]
In ice-9/boot-9.scm:
  66: 12 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 11 [eval # #]
In ice-9/boot-9.scm:
2404: 10 [save-module-excursion #<procedure 55941ee06900 at ice-9/boot-9.scm:4051:3 ()>]
4056: 9 [#<procedure 55941ee06900 at ice-9/boot-9.scm:4051:3 ()>]
In guix/ui.scm:
1501: 8 [run-guix-command pull]
In ice-9/boot-9.scm:
 160: 7 [catch srfi-34 #<procedure 559421ff5480 at guix/ui.scm:552:2 ()> ...]
 160: 6 [catch system-error ...]
 160: 5 [catch git-error ...]
In guix/scripts/pull.scm:
 280: 4 [#<procedure 559421ff51e0 at guix/scripts/pull.scm:244:4 ()>]
In guix/store.scm:
1443: 3 [run-with-store # ...]
In guix/scripts/pull.scm:
 178: 2 [#<procedure 5594249faf30 at guix/scripts/pull.scm:178:2 (state)> #]
In ice-9/eval.scm:
 386: 1 [eval #<memoized ((<3> <1>) <0>)> (# #t # ...)]
In unknown file:
   ?: 0 [scm-error misc-error #f ...]

ERROR: In procedure scm-error:
ERROR: invalid build result (#<derivation /gnu/store/2x15wf0kpmq29bizxz1nl1lgbsyjpc87-compute-guix-derivation.drv => /gnu/store/75vknf0m8z0xdqnbbbms93r94j8y243f-compute-guix-derivation 559422aa07d0> "")
================================================================================

The relevant error is:

================================================================================
./guix/self.scm:80:4: Throw to key `match-error' with args `("match" "no matching pattern" "[email-masked]")'.
================================================================================

I think the error is caused by the pattern matching code not taking into
account the version suffix. Also, I have used 'guix pull --commit ...'
to make sure it is really eaae07ec2 causing the problem.

Cheers,
Alex