[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rolling back only a single package
From: |
Ricardo Wurmus |
Subject: |
Re: rolling back only a single package |
Date: |
Fri, 28 Dec 2018 15:49:05 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
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
- rolling back only a single package, cdelia, 2018/12/28
- Re: rolling back only a single package, Pierre Neidhardt, 2018/12/28
- Re: rolling back only a single package, Tonton, 2018/12/28
- Re: rolling back only a single package, Björn Höfling, 2018/12/28
- Re: rolling back only a single package,
Ricardo Wurmus <=
- Re: rolling back only a single package, cdelia, 2018/12/30
- Re: rolling back only a single package, cdelia, 2018/12/30
- Message not available