~ruther/guix-local

b02469d298d84c665a1970f6462fe241cb4d2150 — Mathieu Othacehe 8 years ago ba773f6
guix: git: Stop using libgit2-shutdown.

* guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent
segfaults when pointer finalizers are run.
1 files changed, 6 insertions(+), 7 deletions(-)

M guix/git.scm
M guix/git.scm => guix/git.scm +6 -7
@@ 34,13 34,12 @@
  (make-parameter "/var/cache/guix/checkouts"))

(define-syntax-rule (with-libgit2 thunk ...)
  (dynamic-wind
    (lambda ()
      (libgit2-init!))
    (lambda ()
      thunk ...)
    (lambda ()
      (libgit2-shutdown))))
  (begin
    ;; XXX: The right thing to do would be to call (libgit2-shutdown) here,
    ;; but pointer finalizers used in guile-git may be called after shutdown,
    ;; resulting in a segfault. Hence, let's skip shutdown call for now.
    (libgit2-init!)
    thunk ...))

(define* (url-cache-directory url
                              #:optional (cache-directory