From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita.karetnikov@gmail.com>
Cc: bug-guix@gnu.org
Subject: Re: Preparing for an alpha release
Date: Sun, 16 Dec 2012 22:54:24 +0100 [thread overview]
Message-ID: <87d2y9irxr.fsf@gnu.org> (raw)
In-Reply-To: <CAD15K4uKVViD9SqQjVPhY-r1Gc=29-Ay_2rP1sLD3zgdFim1jA@mail.gmail.com> (Nikita Karetnikov's message of "Sun, 16 Dec 2012 21:43:20 +0300")
Hello,
Nikita Karetnikov <nikita.karetnikov@gmail.com> skribis:
>> things related to command-line tools, such as options documented and
>> not implemented in ‘guix-package’;
>
> I'd like to implement '--roll-back' and '--search'.
Cool!
> Questions:
>
> scheme@(guile-user)> ,use (guix-package)
> scheme@(guile-user)> %current-profile
> $1 = "/nix/var/nix/profiles/per-user/root/guix-profile"
> scheme@(guile-user)> %profile-directory
> $2 = "/nix/var/nix/profiles/per-user/root"
> scheme@(guile-user)> %user-environment-directory
> $3 = "/root/.guix-profile"
>
> 'ls' doesn't list the above. Why?
$1 gets created only once you’ve run ‘guix-package --install’.
And $3 has to be created manually, currently. Probably ‘guix-package’
should create it automatically. It’s just a fixed symlink to $1.
> How should '--roll-back' work?
Just change /nix/var/nix/profiles/per-user/root/guix-profile to point to
/nix/var/nix/profiles/per-user/root/guix-PREV-profile, where PREV is the
previous generation number (see ‘latest-profile-number’ in guix-package.)
> Does Guix support multiple profiles?
Yes: see the --profile option of guix-package. Same as for nix-env.
> Nix uses the following scheme. [1]
>
> # ls /nix/var/nix/profiles/
> default default-2-link default-5-link default-8-link
> default-10-link default-3-link default-6-link default-9-link
> default-1-link default-4-link default-7-link per-user
>
> What function should be used to access the pointee of 'guix-profile'?
You could use (readlink %current-profile), and then the %PROFILE-RX
regexp of ‘latest-profile-number’ to extract the profile number.
> I assume that it should work like this:
>
> 1. Get the pointee of 'guix-profile'.
>
> 2. Parse the name of the pointee.
>
> 3. Decrement the number and save that as '%current-profile'.
Yes, that’s the idea. And then (delete-file %current-profile) and
(symlink new-profile %current-profile).
> Should 'guix-package' also support '--switch-generation',
Likewise: delete %current-profile and make it point elsewhere.
> '--list-generations',
List the files in %PROFILE-DIRECTORY matching %PROFILE-RX.
> and '--switch-profile'? [1]
Not sure about this one, but it’s basically changing a symlink’s target
again.
> How to implement '--search'?
User would provide a regexp, and you would use ‘fold-packages’ to
traverse all the packages and pattern-match each synopsis and
description, and return the matching packages.
How does that sound?
Thanks!
Ludo’.
prev parent reply other threads:[~2012-12-16 21:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-16 16:56 Preparing for an alpha release Ludovic Courtès
2012-12-16 18:43 ` Nikita Karetnikov
2012-12-16 21:54 ` Ludovic Courtès [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2y9irxr.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bug-guix@gnu.org \
--cc=nikita.karetnikov@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.