Ludovic Courtès (2015-11-22 13:52 +0300) wrote: > Alex Kost <alez...@gmail.com> skribis: > >>>> At first, because of the slowdown: it may be a few hundred milliseconds >>>> for you, but it's several seconds for me. >>> >>> Really? Can you show the output of: >>> >>> time guix package -p /run/current-system/profile \ >>> -p ~/.guix-profile --search-paths >> >> real 0m2.634s >> user 0m0.568s >> sys 0m0.080s > > Ouch, that’s a problem. This suggests that this is 2 seconds of I/O. > I’m not sure what can be done to improve that. > >>> In the discussion of this bug, we tried hard to avoid resorting to >>> invoking a program, but ultimately no other solution came out. >> >> I don't need a solution for this bug, I just want to have an option to >> avoid invoking "guix package --search-paths" in my "/etc/profile". > > Are you denying that this is a bug? Are you denying that there’s a > usability issue at hand?
I agree it's a usability issue. > To me, what 宋文武 reported at the beginning of this thread is a > usability issue. We’ve hacked around it so far, but we know there are > cases where the hacks aren’t enough. > > We could declare it as “won’t fix”, but I’m not comfortable with that. No, no, I'm against “won't fix”. I don't mind if it's called a bug, and a solution you suggest is the best, but it suits only the default case of a single user profile. If I have several user profiles, it does nothing useful for me, only wastes the time. >>>> For example, when I do: >>>> >>>> GUIX_IGNORE_SYSTEM_PROFILE_ENV=1 guix system build my-config.scm >>>> >>>> the "etc/profile" of the built system will not contain those 'eval ...' >>>> lines. WDYT? >>> >>> This would be unreasonable. We’re talking about a basic feature here. >>> If basic features are broken to the point that we prefer to offer ways >>> to bypass them, and have a semi-broken system, then there’s a problem, >>> IMO. >> >> Sorry, but I would really like to bypass this feature > > [...] > > I very well understand your concern, so thanks for chiming in. > Please let’s also consider the bug at hand. OK, for the bug at hand, invoking "guix package --search-paths" looks like the only possible solution, but please don't commit this patch without giving a user a chance to decide what to put in /etc/profile. > The solution I came up with might be inadequate. Then we need to come > up with an alternate proposal, or to resign and mark it as “wontfix.” It is adequate and I'm not against it. > What would you suggest? After all, I realized what is my main concern: "/etc/profile" is non-editable. If I don't like some pieces of this file, I can do nothing, and I just have to live with it and suffer. Ideally I would like to decide what pieces I want to put in /etc/profile and what I don't. But it's probably not possible, so… … what I suggest now is just to give an option to avoid generating the default /etc/profile. What about making an 'operating-system' field for this file (similar to 'sudoers-file' or 'hosts-file')? So when such 'profile-file' is specified, it will be used instead of the default one (of course, it should be mentioned in the manual that it's only for those users who are sure what they do). If this 'profile-file' field appears, I will gladly use it, and I will not object to any future changes in /etc/profile. -- Alex