From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#20255: 'search-paths' should respect both user and system profile. Date: Sun, 05 Apr 2015 20:15:47 +0200 Message-ID: <871tjyfnl8.fsf@gnu.org> References: <877ftschjt.fsf@gmail.com> <87fv8fip01.fsf@gnu.org> <87d23j1bxk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yep5X-0002Qp-Bs for bug-guix@gnu.org; Sun, 05 Apr 2015 14:16:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yep5W-0002zZ-HI for bug-guix@gnu.org; Sun, 05 Apr 2015 14:16:03 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:55894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yep5W-0002zV-Di for bug-guix@gnu.org; Sun, 05 Apr 2015 14:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yep5W-0007A9-5B for bug-guix@gnu.org; Sun, 05 Apr 2015 14:16:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87d23j1bxk.fsf@gmail.com> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Sun, 05 Apr 2015 11:39:03 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 20255@debbugs.gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > As 'guix package' is for only one profile, that's fine. > Since we can get search-paths from system profile using: > guix package -p /run/current-system/profile --search-paths Right. > I think the missing is to check whether we are under GuixSD, > and then merge those 2 search-paths object in scheme level > to get a full search-paths. > > Or better to generate a 'profile' script for each manifest, and then > merged in shell level, so it can work out-of-the-box. How about: > - /etc/profile: > # configuration for the whole system goes here. > # shouldn't refer profile paths. > export LANG=3Den_US.utf8 > export SSL_CERT_DIR=3D/etc/ssl/certs > export LINUX_MODULE_DIRECTORY=3D/run/booted-system/kernel/lib/modules > [...] > > source /run/current-system/profile/etc/profile > > if [ -f $HOME/.guix-profile/etc/profile ]; then > source $HOME/.guix-profile/etc/profile > fi > > # honor setuid-programs > export PATH=3D/run/setuid-programs:$PATH > > - /run/current-system/profile/etc/profile: > export PATH=3D/run/current-system/profile/bin:/run/current-system/pro= file/sbin:$PATH > export MANPATH=3D/run/current-system/profile/share/man:$PATH > [...] >=20=20=20=20=20 > - ~/.guix-profile/etc/profile: > export PATH=3D~/.guix-profile/bin:~/.guix-profile/sbin:$PATH > [...] > > The idea to generate profile from search-paths is not new, > I heard it from you IIRC. > I think it's the time to do it. Agreed, the plan makes sense and I think we have all the bits. A related question is whether to encode search path environment variables into the manifest (currently they are =E2=80=9Cguessed=E2=80=9D b= y looking at same-named packages; see (guix build package).) I think that would probably simplify things and make it easier to share this environment variable code. Thoughts? Thanks, Ludo=E2=80=99.