Re: [gentoo-dev] Re: About time to unify 'cdda' and 'cdaudio' USE flags and make the remaining one global?
El jue, 23-07-2009 a las 03:06 +, Jorge Manuel B. S. Vicetto escribió: > Please don't. > Instead of having an ever larger collection of default use flags in the > desktop profile, we should be taking advantage of EAPI-1 IUSE defaults > and EAPI-2 use dependencies. It's other way to go, of course, and I don't have anything against it :-)
[gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool
On Thu, 2009-07-23 at 11:02 +0530, Nirbheek Chauhan wrote: > 2009/7/23 Sérgio Almeida : > > A child process cannot (or shouldn't be able to) change parent's process > > environment. > > > > uprofile will need to change env var's on-the-fly. For instance tag $PS1 > > with the current profile in use > > > > I don't understand what use this feature has. Won't the "current > profile" be persistent across shells? If so, won't PS1 not be > persistent if you change in on-the-fly? If you don't intend to keep it > persistent, what's the use? (Actually, I don't see the use of having > it at all) > > Nirbheek, You will have a persistent profile across shells and you can change it. (This one requires sourcing). A capability of having a profile per folder (like a folder .uselect per profiled folder) was discussed previously in these lists. (Actually prior to the start of SoC) I still consider this a great feature. You changedir, you call uprofile, and voila, new profile. You login again, default profile. Cheers, Sérgio -- Sérgio Almeida - meph...@gmail.com mephx @ freenode signature.asc Description: This is a digitally signed message part
[gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool
On Thu, 2009-07-23 at 13:17 +0530, Arun Raghavan wrote: > 2009/7/23 Nirbheek Chauhan : > > 2009/7/23 Sérgio Almeida : > >> A child process cannot (or shouldn't be able to) change parent's process > >> environment. > >> > >> uprofile will need to change env var's on-the-fly. For instance tag $PS1 > >> with the current profile in use > >> > > > > I don't understand what use this feature has. Won't the "current > > profile" be persistent across shells? If so, won't PS1 not be > > persistent if you change in on-the-fly? If you don't intend to keep it > > persistent, what's the use? (Actually, I don't see the use of having > > it at all) > > I think the point he is making is that when you update the environment > variable, you want it to start reflecting in the current shell > immediately. Correct me if I'm wrong. > That's correct and incorrect. Let's distinguish YOUR profile from A profile. As I explained to Nirbheek folders can have profiles and these we want to be able to take effect immediately. > If this is the case, spawning a new shell might not be an option, > since you will lose the shell's history (you'll even need to do some > work to make sure you spawn the same shell (bash/csh/zsh) as the user > is currently using. And there's going to be an element of surprise if > multiple calls to uselect end up meaning that the user needs to use > Ctrl-D/logout/exit several times to end the current session. > I agree, just have in mind that it won't be uselect that needs to change these on the fly. Uselect will notify to source your profile as eselect does. For uprofile we can always wrap it under a sh script and source it's stdout after it ran. <- solution? > IMO, it is cleaner to just print a message telling the user to source > /etc/profile as eselect does currently. > > Keep up the good work. Thanks. Cheers, Sérgio -- Sérgio Almeida - meph...@gmail.com mephx @ freenode signature.asc Description: This is a digitally signed message part
Re: [gentoo-dev] Re: About time to unify 'cdda' and 'cdaudio' USE flags and make the remaining one global?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 23 Jul 2009 03:06:36 + "Jorge Manuel B. S. Vicetto" wrote: > Does everyone using the desktop profile really need all of the > following? Not the question to be asking. The question to ask is, for those people who use packages where those flags are relevant, is enabling them the best default behaviour? There's nothing wrong with having USE="foo" set by default if only 1% of users use any package that has IUSE="foo", if for those 1% foo being on by default is the best option. - -- Ciaran McCreesh -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkpobDwACgkQ96zL6DUtXhGMbgCgkGxx53fA/FEA+kPnGjzFiTbh CH4An1QPCc7di4Bg+4r3HCqjLyMZN/4f =lrtl -END PGP SIGNATURE-
[gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool
On Thursday 23 July 2009, Sérgio Almeida wrote: > You changedir, you call uprofile, and > voila, new profile. You login again, default profile. Most shells have the ability to execute a command when a new prompt is generated. Users do not need to call uprofile themselves, they could set up their ~/.*shrc to do this. For zsh (and tcsh), you can define a function: chpwd Executed whenever the current working directory is changed. precmd Executed before each prompt. Note that precommand functions are not re-executed simply because the command line is redrawn, as happens, for example, when a notification about an exiting job is displayed. For bash, you can set a variable: PROMPT_COMMAND If set, the value is executed as a command prior to issuing each primary prompt. You could utilize this to call uprofile, have it output environment variables and set them in the shell environment. A portable (bug ugly, code wise) way would be to do this as part of the PS1 variable. Robert signature.asc Description: This is a digitally signed message part.
[gentoo-dev] Re: [gentoo-soc] Re: Progress on Universal Select Tool
On Thu, 2009-07-23 at 17:28 +0200, Robert Buchholz wrote: > On Thursday 23 July 2009, Sérgio Almeida wrote: > > You changedir, you call uprofile, and > > voila, new profile. You login again, default profile. > > Most shells have the ability to execute a command when a new prompt is > generated. Users do not need to call uprofile themselves, they could > set up their ~/.*shrc to do this. > > For zsh (and tcsh), you can define a function: >chpwd Executed whenever the current working directory is > changed. >precmd Executed before each prompt. Note that precommand > functions are not re-executed simply because the > command line is redrawn, as happens, for example, when > a notification about an exiting job is displayed. > > For bash, you can set a variable: >PROMPT_COMMAND If set, the value is executed as a > command prior to issuing each primary prompt. > > > You could utilize this to call uprofile, have it output environment > variables and set them in the shell environment. A portable (bug ugly, > code wise) way would be to do this as part of the PS1 variable. > This seems interesting... The problem would be to get a unified way of doing this with each and every shell. Can still be done but it's ugly. I'm shure we wouldn't want it to run on every PROMPT but surely on every chdir. We can wrap this into a PROMTP precmd... if cmd = 'chdir': uprofile This gets me into coding... What do you guys think? Cheers, Sérgio -- Sérgio Almeida - meph...@gmail.com mephx @ freenode signature.asc Description: This is a digitally signed message part