From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tk Subject: Re: Package recommended environment variables Date: Thu, 16 May 2019 13:13:13 +0000 Message-ID: References: <87tvduhcgn.fsf@nckx> Reply-To: Tk Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRGM8-0002BA-4B for help-guix@gnu.org; Thu, 16 May 2019 09:23:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRGM5-0005Tm-3H for help-guix@gnu.org; Thu, 16 May 2019 09:23:32 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:58837) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRGM4-0005Pq-BC for help-guix@gnu.org; Thu, 16 May 2019 09:23:28 -0400 In-Reply-To: <87tvduhcgn.fsf@nckx> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: "help-guix@gnu.org" =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Thursday, 16 May 2019 13:21, Tobias Geerinckx-Rice wrote: > Tk, > > Tk wrote: > > > When installing packages, I often get warnings about adding > variables= to .profile . > > Which warnings are these? Are you sure that's what they mean? > > Something like =E2=80=98the following variable definitions might be neede= d=E2=80=99 doesn't mean you should go edit your .profile, but you're far fr= om the first to do so. They are printed because guix cannot change the envi= ronment of the shell that invoked it, so =E2=80=98guix install foo; foo= =E2=80=99 won't work if foo needs a certain environment variable to be set.= It will work if you open a new shell. That's a Unix limitation=C2=B9. > > There was some talk about rephrasing that warning, but IIRC that was diff= icult to do without making other assumptions. I don't know if anything came= of it. > > > These warnings, however, get easily lost when installing bunch > of stu= ff automatically. Is there a way of extracting this info > again? Should I = grep through package definitions? > > Grepping won't help since these variables (=E2=80=98search paths=E2=80= =99) are almost always propagated from dependencies, such as glib. Take a l= ook at the =E2=80=98--search-paths=E2=80=99 argument to =E2=80=98guix packa= ge=E2=80=99. It will probably do what you want. Note that it's not limited = to a single package. > > However, why are you interested in this information? > > - If it's because you're manually adding variables to .profile: don't; = Guix already takes care of this automatically, you should simply source /etc/profile if you aren't already. > > - If it's because you're using an incompatible shell and are maintainin= g your own =E2=80=98port=E2=80=99 of that file: you're probably better off = with a simple =E2=80=98bash -c ". guix-profile/etc/profile && exec myshell"= =E2=80=99 wrapper. > - If it's because Guix's =E2=80=A6/etc/profile is otherwise lacking for= you, please let us know why. > > Kind regards, > > T G-R > > [1]: There are horrible ways to fake this but let's not. > Hi Tobias and others, Thanks for the responses. First of all, I am using the Guix distro, not gui= x inside 3rd party GNU\Linux distribution. At first, it looked to me like I do not need to touch anything, however the= re were few times when I had to export those variables manually, probably b= ecause of the Unix limitation that you mentioned. Unfortunately I do not r= emember where I hit this and if I ever executed a login shell to check this= . Except PATH, there are other environment variables needed by, for example, = R, or Python, or Git. These also get mentioned in the warnings. Are they al= so automatically set and sourced once I enter another login shell? Cheers, Todor