From 1b5db7adac298e4f0d7e6c9024fc31ebabb4a994 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 9 Jul 2019 19:48:01 +0100 Subject: Fix using defined? to check for the open-inferior/container function It doesn't work as intended unless the module is also specified, so do that. --- guix-data-service/jobs/load-new-guix-revision.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 07baf1b..4990208 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -401,7 +401,9 @@ (derivation->output-path derivation))) (define (channel->derivation-file-name store channel) - (define use-container? (defined? 'open-inferior/container)) + (define use-container? (defined? + 'open-inferior/container + (resolve-module '(guix inferior)))) (let ((inferior (if use-container? @@ -413,7 +415,9 @@ #:extra-environment-variables (list (string-append "SSL_CERT_DIR=" (nss-certs-store-path store)))) - (open-inferior (guix-store-path store))))) + (begin + (simple-format #t "debug: using open-inferior\n") + (open-inferior (guix-store-path store)))))) (catch #t @@ -511,11 +515,15 @@ (with-store store (set-build-options store #:fallback? #t) - (let ((inf (if (defined? 'open-inferior/container) + (let ((inf (if (defined? + 'open-inferior/container + (resolve-module '(guix inferior))) (open-inferior/container store store-path #:extra-shared-directories '("/gnu/store")) - (open-inferior store-path)))) + (begin + (simple-format #t "debug: using open-inferior\n") + (open-inferior store-path))))) (inferior-eval '(use-modules (srfi srfi-1) (srfi srfi-34) (guix grafts) -- cgit v1.2.3