From 2734cbb89598dbd212d598800bef5a1e649f71f7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 4 Dec 2015 11:32:50 +0200 Subject: store: 'build-things' now supports older daemon protocols. This is a followup to d203d3d. * guix/store.scm (build-things): Add 'build/old'. Use it when STORE's minor version is less than 15. --- guix/store.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/guix/store.scm b/guix/store.scm index 1818187155..98ccbd1004 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -648,13 +648,22 @@ (define build-things (let ((build (operation (build-things (string-list things) (integer mode)) "Do it!" - boolean))) + boolean)) + (build/old (operation (build-things (string-list things)) + "Do it!" + boolean))) (lambda* (store things #:optional (mode (build-mode normal))) "Build THINGS, a list of store items which may be either '.drv' files or outputs, and return when the worker is done building them. Elements of THINGS that are not derivations can only be substituted and not built locally. Return #t on success." - (build store things mode)))) + (if (>= (nix-server-minor-version store) 15) + (build store things mode) + (if (= mode (build-mode normal)) + (build/old store things) + (raise (condition (&nix-protocol-error + (message "unsupported build mode") + (status 1))))))))) (define-operation (add-temp-root (store-path path)) "Make PATH a temporary root for the duration of the current session. -- cgit v1.2.3