From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] profiles: Report about upgrades. Date: Sat, 30 Aug 2014 21:56:18 +0200 Message-ID: <87bnr1bvkt.fsf@gnu.org> References: <87k3719v7p.fsf@gmail.com> <87r419fa50.fsf@gnu.org> <87fvho9fqm.fsf@gmail.com> <87a97taixl.fsf@gmail.com> <87sil2rbly.fsf@gnu.org> <87tx5idn7f.fsf_-_@gmail.com> <87egwlkcy1.fsf@gnu.org> <87ppg5el2i.fsf@gmail.com> <87d2c5h4if.fsf@gnu.org> <87lhqsev1d.fsf@gmail.com> <877g2c74xh.fsf@gnu.org> <87ha1gds3w.fsf@gmail.com> <878umqe1wm.fsf@gmail.com> <87egwgokco.fsf@gnu.org> <87d2bvcqfx.fsf_-_@gmail.com> 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]:43630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNomh-0005ll-Qf for guix-devel@gnu.org; Sat, 30 Aug 2014 15:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNomY-0003cs-PX for guix-devel@gnu.org; Sat, 30 Aug 2014 15:58:03 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:51975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNomY-0003cj-0U for guix-devel@gnu.org; Sat, 30 Aug 2014 15:57:54 -0400 In-Reply-To: <87d2bvcqfx.fsf_-_@gmail.com> (Alex Kost's message of "Wed, 20 Aug 2014 16:10:10 +0400") 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: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > + (let* ((remove (manifest-matching-entries > + manifest (manifest-transaction-remove transaction))) > + (install/upgrade (manifest-transaction-install transaction)) > + (install '()) > + (upgrade (append-map > + (lambda (entry) > + (let ((matching > + (manifest-matching-entries > + manifest > + (list (manifest-pattern > + (name (manifest-entry-name entry)) > + (output (manifest-entry-output entry= ))))))) > + (when (null? matching) > + (set! install (cons entry install))) > + matching)) > + install/upgrade))) Somehow I had overlooked the =E2=80=98set!=E2=80=99 here. ;-) I=E2=80=99v= e just added an auxiliary procedure, =E2=80=98manifest-transaction-effects=E2=80=99, which = does that in a functional way. Let me know if there=E2=80=99s anything wrong. Ludo=E2=80=99.