bug-guix
[Top][All Lists]
Advanced

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

bug#27284: [PATCH 3/4] Add (guix self) and use it when pulling.


From: Ludovic Courtès
Subject: bug#27284: [PATCH 3/4] Add (guix self) and use it when pulling.
Date: Mon, 18 Dec 2017 15:57:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

As Marius reported on IRC, pulling this branch from current master fails
along these lines:

--8<---------------cut here---------------start------------->8---
$ guix pull --url=$PWD --branch=wip-pull-reload
Updating from Git repository at '/home/ludo/src/guix'...
Building from Git commit 0f34a0f4bc3f7c5483c0c9b09b1e4bf00b85271d...
Unloading current modules...
Loading new modules...
New modules successfully loaded.
Backtrace:
In ice-9/boot-9.scm:
    837:9 19 (catch _ _ #<procedure 7f2a395c6270 at guix/ui.scm:632:6 (key proc 
format-string format-args . res…> …)
    837:9 18 (catch _ _ #<procedure 7f2a361d3aa0 at guix/scripts/pull.scm:244:4 
(key err)> _)
In guix/scripts/pull.scm:
   280:17 17 (_)
In guix/store.scm:
  1443:24 16 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _)
In guix/scripts/pull.scm:
    178:2 15 (_ _)
In unknown file:
          14 (_ #<procedure d86ee60 at ice-9/eval.scm:330:13 ()> #<procedure 
d86ee40 at ice-9/eval.scm:336:13 (…> …)
In guix/packages.scm:
  1207:17 13 (_ #<build-daemon 256.97 2bd6f50>)
   834:14 12 (cache! #<weak-table 0/113> #<package address@hidden 
/gnu/store/3pmjcni27k2kx103l2v56ivcpqg95nvb-guix…> …)
In unknown file:
          11 (_ #<procedure thunk ()> #<procedure list _> #<undefined>)
In guix/packages.scm:
  1154:22 10 (thunk)
  1087:25  9 (bag->derivation #<build-daemon 256.97 2bd6f50> #<<bag> name: 
"guile-2.2.2" system: "x86_64-linux"…> …)
In srfi/srfi-1.scm:
   592:17  8 (map1 (("source" #<origin "mirror://gnu/guile/guile-2.2.2.tar.xz" 
dsi2iymx7mnn5osp2yvcl36pgyq4…>) …))
In ice-9/boot-9.scm:
    837:9  7 (catch srfi-34 #<procedure 1b033780 at guix/packages.scm:898:5 ()> 
#<procedure 1ae27de0 at guix/pa…> …)
In guix/packages.scm:
   903:18  6 (_)
In guix/store.scm:
  1443:24  5 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _)
In guix/packages.scm:
   1255:5  4 (_ _)
In unknown file:
           3 (_ #<procedure 1ae284e0 at ice-9/eval.scm:330:13 ()> #<procedure 
1ae284c0 at ice-9/eval.scm:336:13…> …)
In ice-9/eval.scm:
    159:9  2 (_ #(#(#<directory (guix download) 12d05dc0> #<weak-table 0/31>) 
#<build-daemon 256.97 2bd6f50>))
   293:34  1 (_ #(#(#(#<directory (guix download) 12d05dc0> #<weak-table 0/31>) 
#<build-daemon 256.97 2bd6f…>) #))
In guix/store.scm:
  1164:17  0 (_ #<build-daemon 256.97 2bd6f50>)

guix/store.scm:1164:17: guix/store.scm:1164:17: In procedure 
nix-server-major-version: Wrong type argument: #<build-daemon 256.97 2bd6f50>

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
--8<---------------cut here---------------end--------------->8---

This comes from the fact that current master doesn’t protect against
module reloads like this branch does:

> +(define (build-and-install mdrv)
> +  "Bind MDRV, a monadic value for a derivation, build it, and finally install
> +it as the latest Guix."
> +  (define do-it
> +    ;; Weirdness follows!  Before we were called, the Guix modules have
> +    ;; probably been reloaded, leading to a "parallel universe" with disjoint
> +    ;; record types.  However, procedures in this file have already cached 
> the
> +    ;; module relative to which they lookup global bindings (see
> +    ;; 'toplevel-box' documentation), so they're stuck in the old world.  To
> +    ;; work around that, evaluate our procedure in the context of the "new"
> +    ;; (guix scripts pull) module--which has access to the new <derivation>
> +    ;; record, and so on.
> +    (eval '(lambda (mdrv cont)
> +             ;; Reopen a connection to the daemon so that we have a record
> +             ;; with the new type.
> +             (with-store store
> +               (run-with-store store
> +                 (mlet %store-monad ((drv mdrv))
> +                   (mbegin %store-monad
> +                     (what-to-build (list drv))
> +                     (built-derivations (list drv))
> +                     (return (cont (derivation->output-path drv))))))))
> +          (resolve-module '(guix scripts pull)))) ;the new module
> +
> +  (do-it mdrv
> +         (lambda (result)
> +           (install-latest result (config-directory)))))

I’m thinking that perhaps a middle ground would be to skip the reload
thing when we detect that the calling ‘guix’ is not prepared for module
reloads.

Ludo’.





reply via email to

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