doc install from *Guix Package Info: profile* fails

  • Done
  • quality assurance status badge
Details
3 participants
  • Alex Kost
  • Ludovic Courtès
  • myglc2
Owner
unassigned
Submitted by
myglc2
Severity
normal
M
M
myglc2 wrote on 9 Feb 2016 17:49
(address . bug-guix@gnu.org)
87si116d8j.fsf@gmail.com
Running: guixSD.

Scenario: Finding and installing doc for a package (ncurses) used by a
by a global package (emacs) I hit the following error.

FWIW, IMHO, this functionality, and the ease with which it is available,
is truly awesome!

This failed for both user and root.

Common steps
============
emacs 'M-x guix-system-generations'

In *Guix Generation List: system* move to current & RET

In *Guix Package List: profile* move to emacs & RET

In *Guix Package Info: profile* for emacs-24.5 I move to 'ncurses-6.0' & RET

In *Guix Package Info: profile* for 'ncurses-6.0' move to doc Install & RET

user
====
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (process-package-actions "/var/guix/profiles/system-31-link/profile" #:install '((52640960 "doc")) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #f)
The process begins ...
The following package will be installed:
ncurses:doc 6.0 /gnu/store/wng6fsgiiqi0rcc4p9655ga4b2j5jk53-ncurses-6.0-doc

guix/utils.scm:607:4: In procedure switch-symlinks:
guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-31-link/profile-1-link.new"

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In guix/emacs/guix-main.scm:
942:21 1 (process-package-actions "/var/guix/profiles/system-31-link/profile" #:install ((52640960 "doc")) #:upgrade () #:remove () # …)
In guix/utils.scm:
607:4 0 (switch-symlinks "/var/guix/profiles/system-31-link/profile-1-link" "/gnu/store/i5hmasm569rz24vbi8kv970x4wg31wkk-profile")
scheme@(guile-user) [1]>

root
====
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (process-package-actions "/var/guix/profiles/system-32-link/profile" #:install '((32467968 "doc")) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #f)
The process begins ...
The following package will be installed:
ncurses:doc 6.0 /gnu/store/wng6fsgiiqi0rcc4p9655ga4b2j5jk53-ncurses-6.0-doc

substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/kdpgj81d7fi6pxzv0c43kwr9swzimixa-profile.drv
/gnu/store/s0f0f0y32kjk9km8ki5i5hy6rlhwlxcx-gtk-icon-themes.drv
/gnu/store/himj3dxych8xw300c1dkmyn8kyczry57-ca-certificate-bundle.drv
/gnu/store/bdzjjck73nz1xb8m5f0cj0zzb1cplxg7-info-dir.drv
guix/utils.scm:607:4: In procedure switch-symlinks:
guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-32-link/profile-1-link.new"

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In guix/emacs/guix-main.scm:
942:21 1 (process-package-actions "/var/guix/profiles/system-32-link/profile" #:install ((32467968 "doc")) #:upgrade () #:remove () #:use-substitutes? #t #:dry-run? #f)
In guix/utils.scm:
607:4 0 (switch-symlinks "/var/guix/profiles/system-32-link/profile-1-link" "/gnu/store/bhmslmq75a9vr57bkwricmcax9h6w93k-profile")
scheme@(guile-user) [1]>

config
====================
/var/guix/profiles/system-32-link/profile was installed by
'guix system reconfigure config.l.scm'

/var/guix/profiles/system-31-link/profile was installed by
'sudo ./pre-inst-env guix system reconfigure ../configs/config.k.scm'

config.l.scm and config.k.scm are identical.

gnug/packages/screen.scm contains a minor mod.
A
A
Alex Kost wrote on 9 Feb 2016 19:47
(name . myglc2)(address . myglc2@gmail.com)(address . 22607@debbugs.gnu.org)
8760xxbu1j.fsf@gmail.com
myglc2 (2016-02-09 19:49 +0300) wrote:

Toggle quote (5 lines)
> Running: guixSD.
>
> Scenario: Finding and installing doc for a package (ncurses) used by a
> by a global package (emacs) I hit the following error.

A-a-a! What you tried is more or less the equivalent of:

guix package -i foo --profile=/run/current-system/profile

A system is "composed" during "guix system" command, and it is
immutable, so you can't install packages to an existing system.

The only proper way to install packages globally is by adding them to
your system config.scm and running "guix system reconfigure".

You shouldn't (!) try to install packages in a system profile in any
other way.

[...]
Toggle quote (2 lines)
> user
> ====
[...]
Toggle quote (3 lines)
> guix/utils.scm:607:4: In procedure switch-symlinks:
> guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-31-link/profile-1-link.new"

Unsurprisingly, a user don't have rights to change /var/guix/...

[...]
Toggle quote (3 lines)
> root
> ====

You are brave! I wouldn't try to run Emacs as root and do some unknown
actions.

Toggle quote (14 lines)
> scheme@(guile-user)> (process-package-actions "/var/guix/profiles/system-32-link/profile" #:install '((32467968 "doc")) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #f)
> The process begins ...
> The following package will be installed:
> ncurses:doc 6.0 /gnu/store/wng6fsgiiqi0rcc4p9655ga4b2j5jk53-ncurses-6.0-doc
>
> substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
> The following derivations will be built:
> /gnu/store/kdpgj81d7fi6pxzv0c43kwr9swzimixa-profile.drv
> /gnu/store/s0f0f0y32kjk9km8ki5i5hy6rlhwlxcx-gtk-icon-themes.drv
> /gnu/store/himj3dxych8xw300c1dkmyn8kyczry57-ca-certificate-bundle.drv
> /gnu/store/bdzjjck73nz1xb8m5f0cj0zzb1cplxg7-info-dir.drv
> guix/utils.scm:607:4: In procedure switch-symlinks:
> guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-32-link/profile-1-link.new"

Thanks God /gnu/store on GuixSD is read-only even for root!

A system is not just a set of packages. Look at any
"/var/guix/profiles/system-XX-link" file. It is a symlink to the store.
"profile" (which contains the installed packages) is only one of its
subdirectories. What you tried led to an attempt of making a new
generation of this "profile" directory, and happily in failed even for
root.

Why do you install everything globally? IMO it is much more convenient
to manage a user profile (no root involved, no "system reconfigure" all
the time).

Really, it is a big feature of Guix to be able to install packages
without using root rights. Of course it's your choice, but I highly
recommend to install your packages in ~/.guix-profile. The only global
packages I added to %base-packages are: 'nss-certs' and 'iproute'.

--
Alex
M
M
myglc2 wrote on 10 Feb 2016 01:58
(address . bug-guix@gnu.org)
87oabp5qk0.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:

Toggle quote (11 lines)
> myglc2 (2016-02-09 19:49 +0300) wrote:
>
>> Running: guixSD.
>>
>> Scenario: Finding and installing doc for a package (ncurses) used by a
>> by a global package (emacs) I hit the following error.
>
> A-a-a! What you tried is more or less the equivalent of:
>
> guix package -i foo --profile=/run/current-system/profile

No, I was not trying to do that. I expected your _doc_ button to do ...

guix package -i <ncurses-6.0 doc>.

That is supported, isn't it?

Toggle quote (9 lines)
> A system is "composed" during "guix system" command, and it is
> immutable, so you can't install packages to an existing system.
>
> The only proper way to install packages globally is by adding them to
> your system config.scm and running "guix system reconfigure".
>
> You shouldn't (!) try to install packages in a system profile in any
> other way.

I know. I was not trying to.

Toggle quote (16 lines)
> [...]
>> user
>> ====
> [...]
>> guix/utils.scm:607:4: In procedure switch-symlinks:
>> guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-31-link/profile-1-link.new"
>
> Unsurprisingly, a user don't have rights to change /var/guix/...
>
> [...]
>> root
>> ====
>
> You are brave! I wouldn't try to run Emacs as root and do some unknown
> actions.

Not brave. As I understand your doc, the root user can install packages
in a root profile. So, I expected your _doc_ button to do ...

guix package -i <ncurses-6.0 doc>

... for root. That is supported, isn't it it?

I only tried it on root because I thought not work for uer was a gut. I
expected it to work for root.

Toggle quote (25 lines)
>> scheme@(guile-user)> (process-package-actions "/var/guix/profiles/system-32-link/profile" #:install '((32467968 "doc")) #:upgrade '() #:remove '() #:use-substitutes? #t #:dry-run? #f)
>> The process begins ...
>> The following package will be installed:
>> ncurses:doc 6.0 /gnu/store/wng6fsgiiqi0rcc4p9655ga4b2j5jk53-ncurses-6.0-doc
>>
>> substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
>> The following derivations will be built:
>> /gnu/store/kdpgj81d7fi6pxzv0c43kwr9swzimixa-profile.drv
>> /gnu/store/s0f0f0y32kjk9km8ki5i5hy6rlhwlxcx-gtk-icon-themes.drv
>> /gnu/store/himj3dxych8xw300c1dkmyn8kyczry57-ca-certificate-bundle.drv
>> /gnu/store/bdzjjck73nz1xb8m5f0cj0zzb1cplxg7-info-dir.drv
>> guix/utils.scm:607:4: In procedure switch-symlinks:
>> guix/utils.scm:607:4: In procedure symlink: Read-only file system: "/var/guix/profiles/system-32-link/profile-1-link.new"
>
> Thanks God /gnu/store on GuixSD is read-only even for root!
>
> A system is not just a set of packages. Look at any
> "/var/guix/profiles/system-XX-link" file. It is a symlink to the store.
> "profile" (which contains the installed packages) is only one of its
> subdirectories. What you tried led to an attempt of making a new
> generation of this "profile" directory, and happily in failed even for
> root.
>
> Why do you install everything globally?

Well, let me count the reasons...

1) because that is the first thing you showed me how to do as I was
installing from USB

2) because that is what people who own and/or administer servers need
and/or expect to do

3) because this is how the Debian 8 servers that I want to convert to
guixSD are configured, and I want to see, as a start, a replication of
that situation

4) Because I have multiple accounts for various things that need to
share a base set of packages

5) Because you can't call guixSD a real distribution if it doesn't
support this mode of use

6) Because I am trying to help you test guixSD

7) Because if guixSD does not support this well I can't pitch a trial
deployment at my workplace

But, no, NOT because I am trying to make you CRAZY.

Also, just to be clear, I was not trying to install the curses.6 doc
globally. I was trying to install it locally as 1) user, and when that
failed as 2) root.

Toggle quote (4 lines)
> IMO it is much more convenient
> to manage a user profile (no root involved, no "system reconfigure" all
> the time).

Yes and I was trying to use that guix feature to to add doc for a
package to my user profile.

Toggle quote (5 lines)
> Really, it is a big feature of Guix to be able to install packages
> without using root rights. Of course it's your choice, but I highly
> recommend to install your packages in ~/.guix-profile. The only global
> packages I added to %base-packages are: 'nss-certs' and 'iproute'.

I understand why guix developers and packagers run this way and I
understand the attraction. I have other use cases where this approach
more closely apply. However, if you want to get other people that are
not guix developers or packagers to adopt guix and guixSD, you need to
support users are not so agile, or just want to user guixSD as a
distrubtion.

Recap: these are both bugs not operator error.
A
A
Alex Kost wrote on 10 Feb 2016 11:14
(name . myglc2)(address . myglc2@gmail.com)(address . 22607@debbugs.gnu.org)
87lh6s6fee.fsf@gmail.com
myglc2 (2016-02-10 03:58 +0300) wrote:

Toggle quote (17 lines)
> Alex Kost <alezost@gmail.com> writes:
>
>> myglc2 (2016-02-09 19:49 +0300) wrote:
>>
>>> Running: guixSD.
>>>
>>> Scenario: Finding and installing doc for a package (ncurses) used by a
>>> by a global package (emacs) I hit the following error.
>>
>> A-a-a! What you tried is more or less the equivalent of:
>>
>> guix package -i foo --profile=/run/current-system/profile
>
> No, I was not trying to do that. I expected your _doc_ button to do ...
>
> guix package -i <ncurses-6.0 doc>.

Sorry for the confusion, but this was a wrong expectation. When you
pressed "Install" button, you got a message:

Toggle snippet (6 lines)
Profile: /var/guix/profiles/system-XX-link/profile

Package(s) to install:
ncurses-6.0:doc (gnu/packages/ncurses.scm:90:4)

And you confirmed, that you wanted to install it in
/var/guix/profiles/system-XX-link/profile :-)

Toggle quote (2 lines)
> That is supported, isn't it?

It is. For example, you can "M-x guix-packages-by-name RET ncurses"
(package names are completed) and install it the way you tried. Or from
a list of packages (for example, after "M-x guix-search-by-name RET
guile"), you can mark several packages for installing with "i" and
execute the operation with "x".

Operations on packages (installing/upgrading/deleting) in these
"List"/"Info" buffers are performed using a profile which is the current
for these buffers. Moreover the buffers are named like this:

*Guix Package Info: guix-profile*

"guix-profile" here is the last part of the profile file name:
"/var/guix/profiles/per-user/<user>/guix-profile".

(We can change a default buffer name to contain a full profile name, but
it will be too long, I think)

Anyway, when you looked at the "global" packages, a system profile was
used (as this is where global packages are installed), and when you
tried to install "doc" output of ncurses, it was tried to be installed
in the system profile which is impossible.

[...]
Toggle quote (10 lines)
>> You are brave! I wouldn't try to run Emacs as root and do some unknown
>> actions.
>
> Not brave. As I understand your doc, the root user can install packages
> in a root profile. So, I expected your _doc_ button to do ...
>
> guix package -i <ncurses-6.0 doc>
>
> ... for root. That is supported, isn't it it?

If by root you mean globally (i.e., to a system profile), then no. The
only way to install packages globally is by adding them to a system
config and running "guix system reconfigure".

If you mean to install packages into a root's profile (which is probably
/root/.guix-profile), then yes: in the same way as you would do for a
non-root user.

Toggle quote (3 lines)
> I only tried it on root because I thought not work for uer was a gut. I
> expected it to work for root.

But please pay attention to messages, confirmations, errors. You were
told that you were trying to install to a system profile, not to a
root's user profile.

[...]
Toggle quote (27 lines)
>> A system is not just a set of packages. Look at any
>> "/var/guix/profiles/system-XX-link" file. It is a symlink to the store.
>> "profile" (which contains the installed packages) is only one of its
>> subdirectories. What you tried led to an attempt of making a new
>> generation of this "profile" directory, and happily in failed even for
>> root.
>>
>> Why do you install everything globally?
>
> Well, let me count the reasons...
>
> 1) because that is the first thing you showed me how to do as I was
> installing from USB
>
> 2) because that is what people who own and/or administer servers need
> and/or expect to do
>
> 3) because this is how the Debian 8 servers that I want to convert to
> guixSD are configured, and I want to see, as a start, a replication of
> that situation
>
> 4) Because I have multiple accounts for various things that need to
> share a base set of packages
>
> 5) Because you can't call guixSD a real distribution if it doesn't
> support this mode of use

It is supported through "guix system reconfigure". There is no other way.

Toggle quote (7 lines)
> 6) Because I am trying to help you test guixSD
>
> 7) Because if guixSD does not support this well I can't pitch a trial
> deployment at my workplace
>
> But, no, NOT because I am trying to make you CRAZY.

Thanks :-) OK, you are free to do it the way you like. I was just
saying that managing users profile is more convenient IMO.

Toggle quote (4 lines)
> Also, just to be clear, I was not trying to install the curses.6 doc
> globally. I was trying to install it locally as 1) user, and when that
> failed as 2) root.

Now I understand your intention, but in fact you tried to install it to
a system profile both times.

After all I see why you were confused. Emacs interface has always been
aimed only for a user profile. "M-x guix-system-generations" was added
very recently just to show what systems you have and what global
packages they contain, and by accident you can perform the same actions on
these system packages as with user profile.

I'm going to remove this false possibility (I mean, a user shouldn't get
a chance to install anything to a system profile) to avoid future
confusions. Thanks for reporting!

(Sorry for not answering to the rest of your message, you write the big
ones :-))

--
Alex
L
L
Ludovic Courtès wrote on 10 Feb 2016 14:32
(name . myglc2)(address . myglc2@gmail.com)(address . 22607@debbugs.gnu.org)
87d1s4oflp.fsf@gnu.org
Hi!

As a side note, I think it would be very helpful if you could spend more
time to make your messages concise and to-the-point. I understand it’s
not always easy, but it would increase throughput and probably reduce
frustration as well! :-)

That said, thanks for your reports, which have already helped us improve
the system in several ways.

Ludo’.
L
L
Ludovic Courtès wrote on 10 Feb 2016 14:32
(name . myglc2)(address . myglc2@gmail.com)(address . 22607@debbugs.gnu.org)
87bn7oofli.fsf@gnu.org
Hi!

As a side note, I think it would be very helpful if you could spend more
time to make your messages concise and to-the-point. I understand it’s
not always easy, but it would increase throughput and probably reduce
frustration as well! :-)

That said, thanks for your reports, which have already helped us improve
the system in several ways.

Ludo’.
M
M
myglc2 wrote on 10 Feb 2016 19:36
(name . Alex Kost)(address . alezost@gmail.com)(address . 22607@debbugs.gnu.org)
874mdg5s5w.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:
[...]
Toggle quote (10 lines)
> After all I see why you were confused. Emacs interface has always been
> aimed only for a user profile. "M-x guix-system-generations" was added
> very recently just to show what systems you have and what global
> packages they contain, and by accident you can perform the same actions on
> these system packages as with user profile.
>
> I'm going to remove this false possibility (I mean, a user shouldn't get
> a chance to install anything to a system profile) to avoid future
> confusions. Thanks for reporting!

Sound great! Thank you.

Toggle quote (3 lines)
> (Sorry for not answering to the rest of your message, you write the big
> ones :-))

np, I will work on being concise
M
M
myglc2 wrote on 10 Feb 2016 19:46
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22607@debbugs.gnu.org)
87ziv84d4b.fsf@gmail.com
ludo@gnu.org (Ludovic Courtès) writes:
[...]
Toggle quote (3 lines)
> As a side note, I think it would be very helpful if you could spend more
> time to make your messages concise and to-the-point.

Will do!

Toggle quote (3 lines)
> I understand it’s not always easy, but it would increase throughput
> and probably reduce frustration as well! :-)

To be clear, I am not the least frustrated. But I may have
over-dramatized hypothetical frustration in hypothetical users ;)

Toggle quote (3 lines)
> That said, thanks for your reports, which have already helped us improve
> the system in several ways.

It is a pleasure to have a chance to contribute. Thank you for bearing
with me as I get calibrated with your work and process - George
A
A
Alex Kost wrote on 22 Feb 2016 20:55
(name . myglc2)(address . myglc2@gmail.com)(address . 22607@debbugs.gnu.org)
87r3g4y0yr.fsf@gmail.com
Alex Kost (2016-02-10 13:14 +0300) wrote:

Toggle quote (2 lines)
> myglc2 (2016-02-10 03:58 +0300) wrote:
>
[...]
Toggle quote (17 lines)
>> Also, just to be clear, I was not trying to install the curses.6 doc
>> globally. I was trying to install it locally as 1) user, and when that
>> failed as 2) root.
>
> Now I understand your intention, but in fact you tried to install it to
> a system profile both times.
>
> After all I see why you were confused. Emacs interface has always been
> aimed only for a user profile. "M-x guix-system-generations" was added
> very recently just to show what systems you have and what global
> packages they contain, and by accident you can perform the same actions on
> these system packages as with user profile.
>
> I'm going to remove this false possibility (I mean, a user shouldn't get
> a chance to install anything to a system profile) to avoid future
> confusions.

Done in commit 260795b.

--
Alex
A
A
Alex Kost wrote on 22 Feb 2016 20:57
control message for bug #22607
(address . control@debbugs.gnu.org)
87oab8y0v5.fsf@gmail.com
tags 22607 fixed
close 22607
?
Your comment

This issue is archived.

To comment on this conversation send an email to 22607@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 22607
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch