myglc2 (2016-02-10 03:58 +0300) wrote: > Alex Kost <alez...@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: --8<---------------cut here---------------start------------->8--- Profile: /var/guix/profiles/system-XX-link/profile Package(s) to install: ncurses-6.0:doc (gnu/packages/ncurses.scm:90:4) --8<---------------cut here---------------end--------------->8--- And you confirmed, that you wanted to install it in /var/guix/profiles/system-XX-link/profile :-) > 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. [...] >> 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. > 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. [...] >> 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. > 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. > 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