From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: ui: Move 'show-manifest-transaction' from (guix profiles). Date: Fri, 10 Oct 2014 14:15:01 +0200 Message-ID: <874mvcdsu2.fsf@gnu.org> References: <87eguiiqzt.fsf@gmail.com> <877g0amj55.fsf@gnu.org> <8738aw522l.fsf@gnu.org> <87vbnsh0in.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]:37699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcZ68-00078Z-Ml for guix-devel@gnu.org; Fri, 10 Oct 2014 08:15:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcZ5z-0004Ym-Le for guix-devel@gnu.org; Fri, 10 Oct 2014 08:15:04 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:53037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcZ5z-0004Yb-6H for guix-devel@gnu.org; Fri, 10 Oct 2014 08:14:55 -0400 In-Reply-To: <87vbnsh0in.fsf@gmail.com> (Alex Kost's message of "Fri, 10 Oct 2014 11:00:48 +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: > Ludovic Court=C3=A8s (2014-10-10 02:08 +0400) wrote: [...] >> This is bikeshedding, but I would make a hierarchy like this: >> >> &profile-error, with =E2=80=98profile=E2=80=99 field >> ^ >> .=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=93+=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=93. >> | | >> &profile-not-found-error &missing-generation-error, with =E2=80= =98generation=E2=80=99 field > > Thank you for the idea btw, I like it. So the question is: should the > parent &profile-error be handled as well? If yes, what message to use? Let=E2=80=99s ignore it for now, it Shouldn=E2=80=99t Happen=E2=84=A2. > 2. And another question: the current error for generation would look > like this: > > generation 18 does not exist > > Is it OK or should I use =E2=80=98generation-file-name=E2=80=99 there and= make it: > > generation '/some/path/to/profile/generation-18-link' does not exist I prefer =E2=80=9Cgeneration 18 does not exist=E2=80=9D, or maybe =E2=80=9C= generation 18 of =E2=80=98/some/profile=E2=80=99 does not exist=E2=80=9D. WDYT? > The problem now is I can't add =E2=80=98switch-to-generation=E2=80=99 pro= cedure to (guix > profiles) as it uses =E2=80=98_=E2=80=99 and =E2=80=98switch-symlinks=E2= =80=99 from (guix ui) which is > not =E2=80=9C#:use-module=E2=80=9D-ed anymore. This patch is also attach= ed. What to do > about it? I think moving =E2=80=98switch-to-generation=E2=80=99 to (guix= ui) is not > good or is it? Yeah, a you suggested on IRC, let=E2=80=99s just leave it in (guix scripts package) until we have a better idea. :-) > From af9d9869f2430dd3e20885e685867c6843ba4279 Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Wed, 8 Oct 2014 17:29:01 +0400 > Subject: [PATCH 1/3] profiles: Add condition types for profiles and > generations. > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit > > Suggested by Ludovic Court=C3=A8s. > > * guix/profiles.scm (&profile-error, &profile-not-found-error, > &missing-generation-error): New condition types. > * guix/ui.scm (call-with-error-handling): Handle new types. > * guix/scripts/package.scm (roll-back, guix-package): Raise > '&profile-not-found-error' where needed. Perfect! > From da49a2b7af5295c3c72b7e4590219cbac827877b Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Wed, 8 Oct 2014 00:39:42 +0400 > Subject: [PATCH 2/3] profiles: Add procedures for switching generations. > > * guix/scripts/package.scm (switch-to-previous-generation): Move to... > * guix/profiles.scm: ... here. Use 'switch-to-generation'. > (relative-generation): New procedure. > (previous-generation-number): Use it. > (switch-to-generation): New procedure. Perfect as well, OK to commit. Thanks, Ludo=E2=80=99.