all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: myglc2 <myglc2@gmail.com>
Cc: 22607@debbugs.gnu.org
Subject: bug#22607: doc install from *Guix Package Info: profile* fails
Date: Wed, 10 Feb 2016 13:14:33 +0300	[thread overview]
Message-ID: <87lh6s6fee.fsf@gmail.com> (raw)
In-Reply-To: <87oabp5qk0.fsf@gmail.com> (myglc2@gmail.com's message of "Tue, 09 Feb 2016 19:58:55 -0500")

myglc2 (2016-02-10 03:58 +0300) wrote:

> 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:

--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

  reply	other threads:[~2016-02-10 10:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 16:49 bug#22607: doc install from *Guix Package Info: profile* fails myglc2
2016-02-09 18:47 ` Alex Kost
2016-02-10  0:58   ` myglc2
2016-02-10 10:14     ` Alex Kost [this message]
2016-02-10 18:36       ` myglc2
2016-02-22 19:55       ` Alex Kost
2016-02-10 13:32     ` Ludovic Courtès
2016-02-10 18:46       ` myglc2
2016-02-10 13:32     ` Ludovic Courtès

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=87lh6s6fee.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=22607@debbugs.gnu.org \
    --cc=myglc2@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.