From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: rolling back only a single package Date: Fri, 28 Dec 2018 15:49:05 +0100 Message-ID: <87efa14sgu.fsf@elephly.net> References: <09ccab6e031dddc448863c812f400e0a@dc.uba.ar> <20181228143410.283e8d8a@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gctzX-0005LE-5P for help-guix@gnu.org; Fri, 28 Dec 2018 10:24:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gctgy-0003pJ-1B for help-guix@gnu.org; Fri, 28 Dec 2018 10:05:09 -0500 Received: from sender-of-o53.zoho.com ([135.84.80.218]:21787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gctgx-0003nF-My for help-guix@gnu.org; Fri, 28 Dec 2018 10:04:51 -0500 In-reply-to: <20181228143410.283e8d8a@alma-ubu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?utf-8?Q?Bj=C3=B6rn_H=C3=B6fling?= Cc: cdelia@dc.uba.ar, help-guix@gnu.org Hi cdelia, Bj=C3=B6rn wrote: > There is a nice blog post by Ludivic that describes some aspects of it: > > https://www.gnu.org/software/guix/blog/2018/multi-dimensional-transaction= s-and-rollbacks-oh-my/ > > It looks like the inferior thing he mentioned is already ready, but I > haven't yet followed that. Inferiors work, but you=E2=80=99d use them in manifests. The idea is to in= stall the package with an old version of Guix, but to do it in code instead of manually. Here=E2=80=99s an example: --8<---------------cut here---------------start------------->8--- (use-modules (guix inferior) (guix channels) (srfi srfi-1)) ;for 'first' (define channels ;; This is the old revision from which we want to ;; extract guile-json. (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "65956ad3526ba09e1f7a40722c96c6ef7c0936fe")))) (define inferior ;; An inferior representing the above revision. (inferior-for-channels channels)) ;; Now create a manifest with the current "guile" package ;; and the old "guile-json" package. (packages->manifest (list (first (lookup-inferior-packages inferior "guile-json")) (specification->package "guile"))) --8<---------------cut here---------------end--------------->8--- You can instantiate the manifest the usual way: guix package -m /path/to/manifest.scm -- Ricardo