From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] services: Make dovecot and cups configuration abstractions available Date: Sat, 26 Nov 2016 19:37:58 +0100 Message-ID: <87bmx2nl2x.fsf@gnu.org> 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> <20161126084944.GA6045@jocasta.intra> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAhrR-0002bs-Ei for guix-devel@gnu.org; Sat, 26 Nov 2016 13:38:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAhrN-0004M4-Hv for guix-devel@gnu.org; Sat, 26 Nov 2016 13:38:05 -0500 In-Reply-To: <20161126084944.GA6045@jocasta.intra> (John Darrington's message of "Sat, 26 Nov 2016 09:49:44 +0100") 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: John Darrington Cc: guix-devel@gnu.org John Darrington skribis: > 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 pe= rhaps > this can be generalised a little. Probably, but this patch is just about moving code around. :-) Ludo=E2=80=99.