aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-06-18 22:43:44 +0200
committerLudovic Courtès <ludo@gnu.org>2018-06-18 23:19:51 +0200
commit45779fa676419de8838cb26b6c7a24678a2be1cd (patch)
tree74c4c372ee226745dd1c27f066b3776ba7534229 /build-aux
parent870677cbb85d05688ba85deb9807fdef8bd94e19 (diff)
downloadgnu-guix-45779fa676419de8838cb26b6c7a24678a2be1cd.tar
gnu-guix-45779fa676419de8838cb26b6c7a24678a2be1cd.tar.gz
self: Make (guix config) generation really stateless.
Previously the %CONFIG-VARIABLES list would be generated based on what the current (guix config) contains. Thus, it would include '%guix-register-program', which we recently removed, because existing (guix config) most likely contained that variable. Since its value could differ from machine to machine, the build farm could be building a different config.scm, thereby preventing people from getting substitutes. * guix/self.scm (%config-variables): Turn into a white list instead of taking all the remaining variables from the current (guix config). * build-aux/build-self.scm (%config-variables): Likewise.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/build-self.scm21
1 files changed, 10 insertions, 11 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 5898b6515c..4de91f7fff 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -63,17 +63,16 @@
%guix-home-page-url))
(define %config-variables
- ;; (guix config) variables corresponding to Guix configuration (storedir,
- ;; localstatedir, etc.)
- (sort (filter pair?
- (module-map (lambda (name var)
- (and (not (memq name %dependency-variables))
- (not (memq name %persona-variables))
- (cons name (variable-ref var))))
- (resolve-interface '(guix config))))
- (lambda (name+value1 name+value2)
- (string<? (symbol->string (car name+value1))
- (symbol->string (car name+value2))))))
+ ;; (guix config) variables corresponding to Guix configuration.
+ (letrec-syntax ((variables (syntax-rules ()
+ ((_)
+ '())
+ ((_ variable rest ...)
+ (cons `(variable . ,variable)
+ (variables rest ...))))))
+ (variables %config-directory %localstatedir %state-directory
+ %store-database-directory %store-directory
+ %storedir %sysconfdir %system)))
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
(package-name "GNU Guix")