From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] profiles: Report about upgrades. Date: Sun, 31 Aug 2014 10:04:05 +0400 Message-ID: <87egvxkxey.fsf@gmail.com> 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> <87bnr1bvkt.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]:49392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNyFK-00070H-I2 for guix-devel@gnu.org; Sun, 31 Aug 2014 02:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNyFB-0007Wj-Gh for guix-devel@gnu.org; Sun, 31 Aug 2014 02:04:14 -0400 In-Reply-To: <87bnr1bvkt.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 30 Aug 2014 21:56:18 +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 Ludovic Court=C3=A8s (2014-08-30 23:56 +0400) wrote: > 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 entr= y))))))) >> + (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= =99ve just added an > auxiliary procedure, =E2=80=98manifest-transaction-effects=E2=80=99, whic= h does that in > a functional way. Let me know if there=E2=80=99s anything wrong. Sorry, I didn't know how to avoid =E2=80=98set!=E2=80=99 there. But is it correct to report it like that? I mean if a user has =E2=80=9Cguile-1.8.8=E2=80=9D and installs =E2=80=9Cguile-2.0.9=E2=80=9D th= en (with your variant) he gets: --8<---------------cut here---------------start------------->8--- The following package will be upgraded: guile-2.0.9 out /gnu/store/... --8<---------------cut here---------------end--------------->8--- I thought it should be: --8<---------------cut here---------------start------------->8--- The following package will be upgraded: guile-1.8.8 out /gnu/store/... --8<---------------cut here---------------end--------------->8--- Actually that's why (to avoid possible confusion) I initially suggested: --8<---------------cut here---------------start------------->8--- The following package will be upgraded (removed): guile-1.8.8 out /gnu/store/... The following package will be installed: guile-2.0.9 out /gnu/store/... --8<---------------cut here---------------end--------------->8--- -- Alex