unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
Cc: cdelia@dc.uba.ar, help-guix@gnu.org
Subject: Re: rolling back only a single package
Date: Fri, 28 Dec 2018 15:49:05 +0100	[thread overview]
Message-ID: <87efa14sgu.fsf@elephly.net> (raw)
In-Reply-To: <20181228143410.283e8d8a@alma-ubu>

Hi cdelia,

Björn 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-transactions-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’d use them in manifests.  The idea is to install
the package with an old version of Guix, but to do it in code instead of
manually.  Here’s 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

  reply	other threads:[~2018-12-28 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 19:52 rolling back only a single package cdelia
2018-12-28  7:55 ` Pierre Neidhardt
     [not found]   ` <7bbd5b5a38121bf9a70c1fbe095c39b8@dc.uba.ar>
2018-12-28 22:19     ` cdelia
2018-12-28 11:35 ` Tonton
2018-12-30 22:57   ` cdelia
2018-12-31 15:17     ` Tonton
2018-12-28 13:34 ` Björn Höfling
2018-12-28 14:49   ` Ricardo Wurmus [this message]
2018-12-31  7:11     ` cdelia
2018-12-31  8:23       ` Ricardo Wurmus
2018-12-30 23:37   ` cdelia
2018-12-31  0:59   ` cdelia
     [not found] ` <45406B3B-5E5F-4444-9679-A5DB43D9AE50@pretty.Easy.privacy>
2018-12-28 22:15   ` cdelia
2018-12-29 18:35     ` swedebugia
2018-12-30 22:40       ` Catriel Omar D'Elía

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efa14sgu.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=bjoern.hoefling@bjoernhoefling.de \
    --cc=cdelia@dc.uba.ar \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).