Gentoo Archives: gentoo-dev

From: "Sérgio Almeida" <mephx.x@×××××.com>
To: gentoo-soc@l.g.o
Cc: Gentoo Dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool
Date: Thu, 23 Jul 2009 13:40:27
Message-Id: 1248356417.8713.17.camel@thedude
1 On Thu, 2009-07-23 at 13:17 +0530, Arun Raghavan wrote:
2 > 2009/7/23 Nirbheek Chauhan <nirbheek@g.o>:
3 > > 2009/7/23 Sérgio Almeida <mephx.x@×××××.com>:
4 > >> A child process cannot (or shouldn't be able to) change parent's process
5 > >> environment.
6 > >>
7 > >> uprofile will need to change env var's on-the-fly. For instance tag $PS1
8 > >> with the current profile in use
9 > >>
10 > >
11 > > I don't understand what use this feature has. Won't the "current
12 > > profile" be persistent across shells? If so, won't PS1 not be
13 > > persistent if you change in on-the-fly? If you don't intend to keep it
14 > > persistent, what's the use? (Actually, I don't see the use of having
15 > > it at all)
16 >
17 > I think the point he is making is that when you update the environment
18 > variable, you want it to start reflecting in the current shell
19 > immediately. Correct me if I'm wrong.
20 >
21
22 That's correct and incorrect. Let's distinguish YOUR profile from A
23 profile. As I explained to Nirbheek folders can have profiles and these
24 we want to be able to take effect immediately.
25
26 > If this is the case, spawning a new shell might not be an option,
27 > since you will lose the shell's history (you'll even need to do some
28 > work to make sure you spawn the same shell (bash/csh/zsh) as the user
29 > is currently using. And there's going to be an element of surprise if
30 > multiple calls to uselect end up meaning that the user needs to use
31 > Ctrl-D/logout/exit several times to end the current session.
32 >
33
34 I agree, just have in mind that it won't be uselect that needs to change
35 these on the fly. Uselect will notify to source your profile as eselect
36 does.
37
38 For uprofile we can always wrap it under a sh script and source it's
39 stdout after it ran. <- solution?
40
41 > IMO, it is cleaner to just print a message telling the user to source
42 > /etc/profile as eselect does currently.
43 >
44 > Keep up the good work.
45
46 Thanks. Cheers,
47 Sérgio
48 --
49 Sérgio Almeida - mephx.x@×××××.com
50 mephx @ freenode

Attachments

File name MIME type
signature.asc application/pgp-signature