GNU bug report logs - #22629
Towards a new 'guix pull'

Previous Next

Package: guix;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Thu, 11 Feb 2016 10:36:02 UTC

Severity: important

Merged with 28471

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 22629 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix
Date: Thu, 31 May 2018 16:43:33 +0200
Hello Guix!

Here is the “new” ‘guix pull’ that we discussed notably in this thread:

  https://bugs.gnu.org/22629

The major difference is that instead of just building a bunch of modules
and putting them under ~/.config/guix/latest, it now produces a
standalone package (with bin/guix, share/info/guix.info, etc.) and puts
it in a profile under ~/.config/guix/current.  Quoth the manual:

     The result of running ‘guix pull’ is a “profile” available under
  ‘~/.config/guix/current’ containing the latest Guix.  Thus, make sure to
  add it to the beginning of your search path so that you use the latest
  version, and similarly for the Info manual (*note Documentation::):

       export PATH="$HOME/.config/guix/current/bin:$PATH"
       export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"

     This ‘~/.config/guix/current’ profile works like any other profile
  created by ‘guix package’ (*note Invoking guix package::).  That is, you
  can list generations, roll back to the previous generation—i.e., the
  previous Guix—and so on:

       $ guix package -p ~/.config/guix/current -l
       Generation 1	May 25 2018 10:06:41
         guix	221951a	out	/gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-guix-221951af4

       Generation 2	May 27 2018 19:07:47
        + guix	2fbae00	out	/gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-guix-2fbae006f
        - guix	221951a	out	/gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-guix-221951af4

       Generation 3	May 30 2018 16:11:39	(current)
        + guix	a076f19	out	/gnu/store/332czkicwwg6lc3x4aqbw5q2mq12s7fj-guix-a076f1990
        - guix	2fbae00	out	/gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-guix-2fbae006f
       $ guix package -p ~/.config/guix/current --roll-back
       switched from generation 3 to 2

There are two requirements it fulfills in terms of compatibility:

  1. The modified ‘build-aux/build-self.scm’ still does the right thing
     when evaluated by an “old” Guix—that is, it produces a bunch of
     modules for use in ~/.config/guix/latest as before.

  2. The modified ‘guix pull’ produces ~/.config/guix/current even when
     invoked on a commit of a past Guix.  That is, it automatically
     produces a ‘guix’ command using the modules returned by the old
     ‘build-self.scm’.

There are various improvements we can make from there.  For example,
using “manifest entry properties” as proposed in
<https://bugs.gnu.org/31442>, we can attach meta-data (commit ID, repo
URL, etc.) in each manifest entry that ‘guix pull’ populates; then we
can arrange for ‘guix pull --list-generations’ (say) to display that
information.

We could add ‘guix pull’ options for convenient: ‘--roll-back’,
‘--profile’, etc.

Going forward, additional “channels” could be presented as entries in
the ~/.config/guix/current manifest.

Caveats:

  1. The ~/.config/guix/current profile really lives there.  That is,
     unlike ~/.guix-profile, it’s not in /var/guix/profiles/per-user.
     That could be an issue for cluster setups where home directories
     are not scanned by the Guix GC.  Cluster folks, please tell me!

  2. The translated Info manual is not built.  Julien: could you turn
     the big ‘xref_command’ in a script or something that we can more
     easily reuse in (guix self)?

  3. C++ code is not built.  I wonder which will come first: getting rid
     of the C++ code, or building it?  :-)

Feedback welcome!

Ludo’.

Ludovic Courtès (4):
  self: Produce a complete package with the 'guix' command.
  pull: Install the new Guix in a profile.
  self: Compute and use locale data.
  self: Build the Info manual.

 build-aux/build-self.scm            |  19 +-
 build-aux/compile-as-derivation.scm |   2 +-
 doc/guix.texi                       |  38 +++-
 guix/scripts/pull.scm               |  79 +++++---
 guix/self.scm                       | 283 ++++++++++++++++++++++++----
 scripts/guix.in                     |  14 +-
 6 files changed, 351 insertions(+), 84 deletions(-)

-- 
2.17.0





This bug report was last modified 6 years and 322 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.