aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-13 22:58:15 +0100
committerChristopher Baines <mail@cbaines.net>2019-06-13 22:58:15 +0100
commit6f379c7937fe5311d48640fd96c02e2fab5bbcf0 (patch)
tree4465791a059cd015dcef471b33fac6cecaaa0197
parent7c75591f44526a856c6780618ab08918a171feec (diff)
downloaddata-service-6f379c7937fe5311d48640fd96c02e2fab5bbcf0.tar
data-service-6f379c7937fe5311d48640fd96c02e2fab5bbcf0.tar.gz
Rework creating /etc when building the derivation for a revision
Within an inferior. Just use the presence of open-inferior/container directly, as this is more explicit.
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index d27b2bf..c51e91e 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -266,8 +266,10 @@
(derivation->output-path derivation)))
(define (channel->derivation-file-name store channel)
+ (define use-container? (defined? 'open-inferior/container))
+
(let ((inferior
- (if (defined? 'open-inferior/container)
+ (if use-container?
(open-inferior/container
store
(guix-store-path store)
@@ -282,13 +284,13 @@
#t
(lambda ()
;; /etc is only missing if open-inferior/container has been used
- (unless (file-exists? "/etc")
- ;; Create /etc/pass, as %known-shorthand-profiles in (guix
- ;; profiles) tries to read from this file. Because the environment
- ;; is cleaned in build-self.scm, xdg-directory in (guix utils)
- ;; falls back to accessing /etc/passwd.
+ (when use-container?
(inferior-eval
'(begin
+ ;; Create /etc/pass, as %known-shorthand-profiles in (guix
+ ;; profiles) tries to read from this file. Because the environment
+ ;; is cleaned in build-self.scm, xdg-directory in (guix utils)
+ ;; falls back to accessing /etc/passwd.
(mkdir "/etc")
(call-with-output-file "/etc/passwd"
(lambda (port)