From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] services: Make dovecot and cups configuration abstractions available Date: Sat, 26 Nov 2016 09:49:44 +0100 Message-ID: <20161126084944.GA6045@jocasta.intra> References: <20161120180747.2e7b4b09@lepiller.eu> <874m2z9ll8.fsf@gnu.org> <20161123220826.4ac6398b@lepiller.eu> <874m2xzx7f.fsf@lassieur.org> <8737ih6mdq.fsf@gnu.org> <20161124191531.641ec0f9@lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAYgB-0001x3-C7 for guix-devel@gnu.org; Sat, 26 Nov 2016 03:49:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAYg7-0001Ar-OD for guix-devel@gnu.org; Sat, 26 Nov 2016 03:49:51 -0500 Received: from de.cellform.com ([88.217.224.109]:58842 helo=jocasta.intra) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cAYg7-00019t-G9 for guix-devel@gnu.org; Sat, 26 Nov 2016 03:49:47 -0500 Content-Disposition: inline In-Reply-To: <20161124191531.641ec0f9@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller Cc: guix-devel@gnu.org --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 24, 2016 at 07:17:42PM +0100, Julien Lepiller wrote: +(define (serialize-string field-name val) + (serialize-field field-name val)) I find it useful to allow such fields to take the value #f and meaning that they will be ignored by their respective serialize- procedures. For example: (define (serialize-string field-name val) (if val (serialize-field field-name val))) +(define (serialize-boolean field-name val) + (serialize-string field-name (if val "yes" "no"))) Some configs require "true" and "false" instead of "yes" and "no". So perh= aps this can be generalised a little. J' =20 --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlg5TKgACgkQimdxnC3oJ7P8FACfZwPh0KQkKQrSWHw2E4jmZCIC khYAn0RXa7HNdolfOno4TS6eitP2PiQV =c95k -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--