[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70494] [PATCH 06/23] store: Export protocol related constants.
From: |
Christopher Baines |
Subject: |
[bug#70494] [PATCH 06/23] store: Export protocol related constants. |
Date: |
Sun, 21 Apr 2024 10:42:24 +0100 |
* guix/store.scm (%protocol-version, %worker-magic-1, %worker-magic-2): Export
variables.
(protocol-major, protocol-minor, protocol-version): Export procedures.
(%stderr-next, %stderr-read, %stderr-write, %stderr-last, %stderr-error):
Move from process-stderr and export variables.
Change-Id: Id0b1b5e6feeac5260875558f33aa5d923d5e0903
---
guix/store.scm | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/guix/store.scm b/guix/store.scm
index c3b58090e5..578e46507e 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -206,18 +206,25 @@ (define-module (guix store)
derivation-log-file
log-file))
-(define %protocol-version #x164)
+(define-public %protocol-version #x164)
-(define %worker-magic-1 #x6e697863) ; "nixc"
-(define %worker-magic-2 #x6478696f) ; "dxio"
+(define-public %worker-magic-1 #x6e697863) ; "nixc"
+(define-public %worker-magic-2 #x6478696f) ; "dxio"
-(define (protocol-major magic)
+(define-public (protocol-major magic)
(logand magic #xff00))
-(define (protocol-minor magic)
+(define-public (protocol-minor magic)
(logand magic #x00ff))
-(define (protocol-version major minor)
+(define-public (protocol-version major minor)
(logior major minor))
+;; magic cookies from worker-protocol.hh
+(define-public %stderr-next #x6f6c6d67) ; "olmg", build log
+(define-public %stderr-read #x64617461) ; "data", data needed from
source
+(define-public %stderr-write #x64617416) ; "dat\x16", data for sink
+(define-public %stderr-last #x616c7473) ; "alts", we're done
+(define-public %stderr-error #x63787470) ; "cxtp", error reporting
+
(define-syntax define-enumerate-type
(syntax-rules ()
((_ name->int (name id) ...)
@@ -709,13 +716,6 @@ (define* (process-stderr server #:optional user-port)
(define p
(store-connection-socket server))
- ;; magic cookies from worker-protocol.hh
- (define %stderr-next #x6f6c6d67) ; "olmg", build log
- (define %stderr-read #x64617461) ; "data", data needed from source
- (define %stderr-write #x64617416) ; "dat\x16", data for sink
- (define %stderr-last #x616c7473) ; "alts", we're done
- (define %stderr-error #x63787470) ; "cxtp", error reporting
-
(let ((k (read-int p)))
(cond ((= k %stderr-write)
;; Write a byte stream to USER-PORT.
--
2.41.0
- [bug#70494] [PATCH 01/23] store: database: Register derivation outputs., (continued)
- [bug#70494] [PATCH 01/23] store: database: Register derivation outputs., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 21/23] scripts: substitute: Don't enforce cached connections in download-nar., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 08/23] store: Add text-output-path and text-output-path-from-hash., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 09/23] store: Add validate-store-name., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 13/23] syscalls: Add unshare., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 11/23] scripts: substitute: Untangle selecting fast vs small compressions., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 10/23] store: database: Add procedures for querying valid paths., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 12/23] scripts: substitute: Extract script specific output from download-nar., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 23/23] substitutes: Add #:keep-alive? keyword argument to download-nar., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 15/23] store: Export operation-id., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 06/23] store: Export protocol related constants.,
Christopher Baines <=
- [bug#70494] [PATCH 22/23] substitutes: Move download-nar from substitutes script to here., Christopher Baines, 2024/04/21
- [bug#70494] [PATCH 14/23] scripts: perform-download: Support configuring the %store-prefix., Christopher Baines, 2024/04/21