summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-11-18 15:56:06 +0100
committerLudovic Courtès <ludo@gnu.org>2026-01-27 12:58:17 +0100
commitb67831bb6e01329d3ac8cf10e1b06e63125e23dd (patch)
tree52a40c158a523b5fb0c7ebf1019cffbbcc705892
parent40b525be0227970ce6bb3d621926835d5c0ba43c (diff)
store: Require a more recent minor version.
* guix/store.scm (open-connection): Require minor version #x61 or later. (set-build-options): Remove now useless conditionals. (build-things): Remove ‘build/old’ and the condition on the minor version. Change-Id: I17835524ad7d69d29dba81292c6691212e200117 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/store.scm23
1 files changed, 4 insertions, 19 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 87f4ef0874d..25c3022b881 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -514,7 +514,7 @@ daemon. Return a server object."
514 (unless (= (protocol-major %protocol-version) 514 (unless (= (protocol-major %protocol-version)
515 (protocol-major v)) 515 (protocol-major v))
516 (handshake-error)) 516 (handshake-error))
517 (unless (>= (protocol-minor v) 14) ;minor version < 14 never existed 517 (unless (>= (protocol-minor v) #x61) ;61 was added in Jan. 2017
518 (handshake-error)) 518 (handshake-error))
519 519
520 (write-value integer %protocol-version port) 520 (write-value integer %protocol-version port)
@@ -778,18 +778,11 @@ encoding conversion errors."
778 (write-value integer (operation-id set-options) buffered) 778 (write-value integer (operation-id set-options) buffered)
779 (send (boolean keep-failed?) (boolean keep-going?) 779 (send (boolean keep-failed?) (boolean keep-going?)
780 (boolean fallback?) (integer verbosity)) 780 (boolean fallback?) (integer verbosity))
781 (when (< (store-connection-minor-version server) #x61)
782 (let ((max-build-jobs (or max-build-jobs 1))
783 (max-silent-time (or max-silent-time 3600)))
784 (send (integer max-build-jobs) (integer max-silent-time))))
785 (send (boolean (if (unspecified? use-build-hook?) 781 (send (boolean (if (unspecified? use-build-hook?)
786 offload? 782 offload?
787 use-build-hook?))) 783 use-build-hook?)))
788 (send (integer build-verbosity) (integer log-type) 784 (send (integer build-verbosity) (integer log-type)
789 (boolean print-build-trace)) 785 (boolean print-build-trace))
790 (when (< (store-connection-minor-version server) #x61)
791 (let ((build-cores (or build-cores (current-processor-count))))
792 (send (integer build-cores))))
793 (send (boolean use-substitutes?)) 786 (send (boolean use-substitutes?))
794 (let ((pairs `(;; This option is honored by 'guix substitute' et al. 787 (let ((pairs `(;; This option is honored by 'guix substitute' et al.
795 ,@(if print-build-trace 788 ,@(if print-build-trace
@@ -1355,10 +1348,7 @@ CUTOFF is the threshold above which we stop accumulating unresolved nodes."
1355 (let ((build (operation (build-things (string-list things) 1348 (let ((build (operation (build-things (string-list things)
1356 (integer mode)) 1349 (integer mode))
1357 "Do it!" 1350 "Do it!"
1358 boolean)) 1351 boolean)))
1359 (build/old (operation (build-things (string-list things))
1360 "Do it!"
1361 boolean)))
1362 (lambda* (store things #:optional (mode (build-mode normal))) 1352 (lambda* (store things #:optional (mode (build-mode normal)))
1363 "Build THINGS, a list of store items which may be either '.drv' files or 1353 "Build THINGS, a list of store items which may be either '.drv' files or
1364outputs, and return when the worker is done building them. Elements of THINGS 1354outputs, and return when the worker is done building them. Elements of THINGS
@@ -1382,13 +1372,8 @@ When a handler is installed with 'with-build-handler', it is called any time
1382 ;; version change happened with commit 6ef61cc4c30 on the 1372 ;; version change happened with commit 6ef61cc4c30 on the
1383 ;; 2018/10/15). 1373 ;; 2018/10/15).
1384 (warn-about-old-daemon)) 1374 (warn-about-old-daemon))
1385 (if (>= (store-connection-minor-version store) 15) 1375
1386 (build store things mode) 1376 (build store things mode)))))))
1387 (if (= mode (build-mode normal))
1388 (build/old store things)
1389 (raise (condition (&store-protocol-error
1390 (message "unsupported build mode")
1391 (status 1))))))))))))
1392 1377
1393(define-operation (ensure-path (store-path path)) 1378(define-operation (ensure-path (store-path path))
1394 "Ensure that a path is valid. If it is not valid, it may be made valid by 1379 "Ensure that a path is valid. If it is not valid, it may be made valid by