Ludovic Courtès (2015-11-22 13:52 +0300) wrote:
Toggle quote (26 lines)
> Alex Kost <alezost@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.
Toggle quote (6 lines)
> 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, anda solution you suggest is the best, but it suits only the default caseof a single user profile. If I have several user profiles, it doesnothing useful for me, only wastes the time.
Toggle quote (19 lines)
>>>> 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" lookslike the only possible solution, but please don't commit this patchwithout giving a user a chance to decide what to put in /etc/profile.
Toggle quote (3 lines)
> 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.
Toggle quote (2 lines)
> What would you suggest?
After all, I realized what is my main concern: "/etc/profile" isnon-editable. If I don't like some pieces of this file, I can donothing, and I just have to live with it and suffer. Ideally I wouldlike to decide what pieces I want to put in /etc/profile and what Idon't. But it's probably not possible, so…
… what I suggest now is just to give an option to avoid generating thedefault /etc/profile. What about making an 'operating-system' field forthis 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 forthose users who are sure what they do).
If this 'profile-file' field appears, I will gladly use it, and I willnot object to any future changes in /etc/profile.
-- Alex