From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: Service refactoring Date: Tue, 08 Sep 2015 10:47:34 +0200 Message-ID: <87fv2pe1qx.fsf@igalia.com> References: <87a8t3mc2v.fsf@netris.org> <87d1xyk45i.fsf@igalia.com> <87vbbn44zi.fsf_-_@gnu.org> 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]:60054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZEZd-00061M-9N for guix-devel@gnu.org; Tue, 08 Sep 2015 04:48:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZEZa-0006cu-1b for guix-devel@gnu.org; Tue, 08 Sep 2015 04:48:17 -0400 In-Reply-To: <87vbbn44zi.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Sun, 06 Sep 2015 23:23:13 +0200") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org On Sun 06 Sep 2015 23:23, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Service types and their =E2=80=9Cextends=E2=80=9D relations form a DAG I am not sure how much ordering matters. The reason is that the "extends" relations actually proceed from packages associated with a service, not the service itself. It's enough to know the set of services and their associated extends; ordering does not appear to be important. Of course we could do a topological sort on services for some other reason, but we don't actually need to for these purposes. I think a two-phase configuration can work: one, in which we specify services like this: (operating-system ... (services SERVICES)) and a second in which the services are "finalized". Finalization is a monadic procedure of type SERVICE SERVICES -> SERVICE. Finalization is where e.g. udev would grovel the SERVICES to collect all udev extends. Andy