GNU bug report logs

#20255 'search-paths' should respect both user and system profile.

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #11 received at 20255@debbugs.gnu.org (full text, mbox, reply):

Received: (at 20255) by debbugs.gnu.org; 5 Apr 2015 03:38:43 +0000
From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 04 23:38:43 2015
Received: from localhost ([127.0.0.1]:45000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1YebOV-0006MP-1p
	for submit@debbugs.gnu.org; Sat, 04 Apr 2015 23:38:43 -0400
Received: from mail-pa0-f41.google.com ([209.85.220.41]:35833)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <iyzsong@gmail.com>) id 1YebOS-0006MC-B3
 for 20255@debbugs.gnu.org; Sat, 04 Apr 2015 23:38:41 -0400
Received: by patj18 with SMTP id j18so6916680pat.2
 for <20255@debbugs.gnu.org>; Sat, 04 Apr 2015 20:38:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:in-reply-to:references:user-agent:date
 :message-id:mime-version:content-type:content-transfer-encoding;
 bh=3gsyeaAqqZUfIfdAU4FNiPw9wCiUjYsY+fRan3S85i4=;
 b=dOIyBw1gp88jPfThZKZ9CRAoSG2e3XEw7g/nKpz8P3oY6lkQNVMf6OtW31+5ZjSl6P
 gfyhRtAhnEEJ8Mv97Upeh7PH8Y0kljOUx3X4X1ZOioQnee3tNpyFEPHtbVdxN8bWSOf/
 lTbFRbwjR6hHR3MD+k9flOZ2kLSVUxlz8mO/bPmG8pyx852309/YDvcX7MnrvAjAokKV
 QIQsphTtG3iJSrD95OSDrxMsIcbVrCQNunOUmbaO5VhYRLseQJPQXa/fsONH9XACiiHT
 7JvjvOVoZxiI1sQGTbevRa85NV1cXQEGAUCteOCXrWAP0XlQSH6CWpE05tTAEuGaRMKn
 b3/A==
X-Received: by 10.70.129.202 with SMTP id ny10mr6380047pdb.107.1428205114366; 
 Sat, 04 Apr 2015 20:38:34 -0700 (PDT)
Received: from localhost ([108.61.250.36])
 by mx.google.com with ESMTPSA id j5sm372400pdo.60.2015.04.04.20.38.33
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 04 Apr 2015 20:38:33 -0700 (PDT)
From: 宋文武 <iyzsong@gmail.com>
To: Ludovic Courtès <ludo@gnu.org>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
In-Reply-To: <87fv8fip01.fsf@gnu.org>
References: <877ftschjt.fsf@gmail.com> <87fv8fip01.fsf@gnu.org>
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1
 (x86_64-unknown-linux-gnu)
Date: Sun, 05 Apr 2015 11:39:03 +0800
Message-ID: <87d23j1bxk.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20255
Cc: 20255@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -0.7 (/)
Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> Currently, search-paths built only from packages in user's profile.
>> As reported by Andy Wingo in #guix, when I have:
>>   perl installed into system profile
>>   perl-xml-parser installed into user profile
>>   
>> guix package --search-paths won't give a hint about PERL5LIB,
>> so it's very likely end up with a broken XML::Parser.
>
> Rather it ends up with no XML::Parser, no?
>
> That said, I’m not sure how this could be improved.  We could hard-code
> lookup in /run/current-system/profile/.  OTOH that’s not different from
> installing perl in one profile, and perl-xml-parser in another
> (arbitrary) profile, which ‘guix package’ cannot be aware of.
>
> WDYT?
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

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=en_US.utf8
    export SSL_CERT_DIR=/etc/ssl/certs
    export LINUX_MODULE_DIRECTORY=/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=/run/setuid-programs:$PATH

  - /run/current-system/profile/etc/profile:
    export PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin:$PATH
    export MANPATH=/run/current-system/profile/share/man:$PATH
    [...]
    
  - ~/.guix-profile/etc/profile:
    export PATH=~/.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.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Sep 7 12:34:08 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.