summaryrefslogtreecommitdiff
path: root/gnu/services/file-sharing.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-27 15:18:51 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-01 12:49:35 -0400
commita2b89a3319dc1d621c546855f578acae5baaf6da (patch)
tree29f885701c528d93a7f6b764135e8c93935cd864 /gnu/services/file-sharing.scm
parent4905b5b83904366d068bde899aae15288cc1adcb (diff)
services: configuration: Step back from *unspecified*.
Fixes <https://issues.guix.gnu.org/56799>. This partially reverts 8cb1a49a3998c39f315a4199b7d4a121a6d66449. Rationale: *unspecified* cannot be serialized thus used as a G-Expression input, which is problematic/inconvenient when using deeply nested records. As an example, jami-service-type was broken when using partially defined <jami-account> records. * gnu/services/configuration.scm (define-maybe-helper): Check against the 'unset symbol. (normalize-field-type+def): Adjust value to 'unset. (define-configuration-helper): Use 'unset as the default value thunk. * gnu/services/file-sharing.scm (serialize-maybe-string): Check against the 'unset symbol. (serialize-maybe-file-object): Likewise. * gnu/services/messaging.scm (define-all-configurations): Use 'unset as value. (raw-content?): Check against 'unset symbol. (prosody-configuration)[http-max-content-size]: Default to 'unset. [http-external-url]: Likewise. [mod-muc]: Likewise. [raw-content]: Likewise. * gnu/services/networking.scm (opendht-configuration): Adjust documentation. * gnu/services/telephony.scm (jami-shepherd-services): Replace *undefined* with the 'unset symbol. * tests/services/configuration.scm ("maybe type, no default"): Check against the 'unset symbol. * doc/guix.texi: Regenerate the opendht-configuration, openvpn-client-configuration and openvpn-server-configuration documentation.
Diffstat (limited to 'gnu/services/file-sharing.scm')
-rw-r--r--gnu/services/file-sharing.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/services/file-sharing.scm b/gnu/services/file-sharing.scm
index e32d1f145d..5df8b0d597 100644
--- a/gnu/services/file-sharing.scm
+++ b/gnu/services/file-sharing.scm
@@ -115,7 +115,7 @@ type generated and used by Transmission clients, suitable for passing to the
(set! serialize-maybe-string
(lambda (field-name val)
(serialize-string field-name
- (if (unspecified? val)
+ (if (eq? val 'unset)
""
val))))
@@ -180,7 +180,7 @@ type generated and used by Transmission clients, suitable for passing to the
(define-maybe file-object)
(set! serialize-maybe-file-object
(lambda (field-name val)
- (if (unspecified? val)
+ (if (eq? val 'unset)
(serialize-string field-name "")
(serialize-file-object field-name val))))