GNU bug report logs - #20255
'search-paths' should respect both user and system profile.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: 宋文武 <iyzsong@HIDDEN>; Keywords: patch; dated Sat, 4 Apr 2015 10:30:03 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added tag(s) patch. Request was from ludo@HIDDEN (Ludovic Courtès) to control <at> debbugs.gnu.org. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 30 Nov 2015 12:25:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 07:25:12 2015
Received: from localhost ([127.0.0.1]:60173 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a3NW3-0003pz-UU
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2015 07:25:12 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43228)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a3NW1-0003pr-6s
 for 20255 <at> debbugs.gnu.org; Mon, 30 Nov 2015 07:25:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a3NVv-0000RO-7T
 for 20255 <at> debbugs.gnu.org; Mon, 30 Nov 2015 07:25:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45088)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a3NVv-0000RK-4Q; Mon, 30 Nov 2015 07:25:03 -0500
Received: from [85.119.43.29] (port=41760 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a3NVu-0002kk-FK; Mon, 30 Nov 2015 07:25:02 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <877fl7cnxl.fsf@HIDDEN> <874mg3dfbo.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 10 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Mon, 30 Nov 2015 13:25:00 +0100
In-Reply-To: <874mg3dfbo.fsf@HIDDEN> (Alex Kost's message of "Mon, 30 Nov
 2015 12:08:59 +0300")
Message-ID: <87r3j7d68z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-24 20:22 +0300) wrote:
>
>> Alex Kost <alezost@HIDDEN> skribis:
>>
>>> Ludovic Court=C3=A8s (2015-11-21 23:10 +0300) wrote:
>>
>> [...]
>>
>>>> Really?  Can you show the output of:
>>>>
>>>>   time guix package -p /run/current-system/profile \
>>>>                     -p ~/.guix-profile --search-paths
>>>
>>> real	0m2.634s
>>> user	0m0.568s
>>> sys	0m0.080s
>>
>> Could you measure again after cc3de1d?
>>
>> As it turns out, =E2=80=98guix package=E2=80=99 loads way too much and a=
lso stats too
>> much, at least for simple operations like --search-paths.
>
> real	0m1.122s
> user	0m0.244s
> sys	0m0.044s
>
> I measured it several times with a "cold" HDD (I mean when appropriate
> files were not cached), and the real time was always 1.0=E2=80=941.3s.  B=
ig
> improvement!  Thank you very much for this, autoloads are great!

Great, thanks for testing!  That=E2=80=99s still too much to my state, but =
it=E2=80=99s
already an improvement.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 30 Nov 2015 09:09:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 04:09:05 2015
Received: from localhost ([127.0.0.1]:60080 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a3KSH-0007hS-In
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2015 04:09:05 -0500
Received: from mail-lf0-f42.google.com ([209.85.215.42]:35230)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1a3KSF-0007hK-0y
 for 20255 <at> debbugs.gnu.org; Mon, 30 Nov 2015 04:09:03 -0500
Received: by lfdl133 with SMTP id l133so187042451lfd.2
 for <20255 <at> debbugs.gnu.org>; Mon, 30 Nov 2015 01:09:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:message-id:user-agent
 :mime-version:content-type:content-transfer-encoding;
 bh=gQiHa5yVAJSW6oXw+8I3JKqeI6GKnZGUd896kRyXYYU=;
 b=y0DL9lZMuprm3Y3ri2yVWNIptauP5dx6aDJ455DXtoLaZvh4sUR86JkMholaawqKDh
 LljuO+xlOt/toZAHqiLVDjpaSK3ToMpRN86q0bfgUHgLqGs1k822UZQi1dbnIbt0XuKy
 Lsp1VtW/sTNr1j9qeUbekMP2XsTgOuqc3mbBRfWjj8rmmmoSPTzCCBDH4Y663+pNLlVZ
 yPgMZevixO7eIBD+sYCcHSS7jl7AfQ5moYTsKzxegNP9eTwUv8FBheVRUR5j5F8lbE8S
 8OD8uUp6ZS5fj9aYsn/5bvjQySMnpW8iHmT76bqcR5AzC5VcrYrE7h5weGR35vwsLY/s
 VEEQ==
X-Received: by 10.25.17.232 with SMTP id 101mr26214402lfr.38.1448874542060;
 Mon, 30 Nov 2015 01:09:02 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id l81sm6980725lfb.40.2015.11.30.01.09.00
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 30 Nov 2015 01:09:01 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <877fl7cnxl.fsf@HIDDEN>
Date: Mon, 30 Nov 2015 12:08:59 +0300
Message-ID: <874mg3dfbo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-24 20:22 +0300) wrote:

> Alex Kost <alezost@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s (2015-11-21 23:10 +0300) wrote:
>
> [...]
>
>>> Really?  Can you show the output of:
>>>
>>>   time guix package -p /run/current-system/profile \
>>>                     -p ~/.guix-profile --search-paths
>>
>> real	0m2.634s
>> user	0m0.568s
>> sys	0m0.080s
>
> Could you measure again after cc3de1d?
>
> As it turns out, =E2=80=98guix package=E2=80=99 loads way too much and al=
so stats too
> much, at least for simple operations like --search-paths.

real	0m1.122s
user	0m0.244s
sys	0m0.044s

I measured it several times with a "cold" HDD (I mean when appropriate
files were not cached), and the real time was always 1.0=E2=80=941.3s.  Big
improvement!  Thank you very much for this, autoloads are great!

--=20
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 24 Nov 2015 17:22:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 12:22:39 2015
Received: from localhost ([127.0.0.1]:51595 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a1HId-0002yB-JM
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2015 12:22:39 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58834)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a1HIc-0002y4-LT
 for 20255 <at> debbugs.gnu.org; Tue, 24 Nov 2015 12:22:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a1HIX-0002eR-Ji
 for 20255 <at> debbugs.gnu.org; Tue, 24 Nov 2015 12:22:38 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33474)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a1HIX-0002eM-Hd; Tue, 24 Nov 2015 12:22:33 -0500
Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:34776 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a1HIW-00089g-Mf; Tue, 24 Nov 2015 12:22:33 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
Date: Tue, 24 Nov 2015 18:22:30 +0100
In-Reply-To: <87r3jisc76.fsf@HIDDEN> (Alex Kost's message of "Sun, 22 Nov
 2015 10:52:29 +0300")
Message-ID: <877fl7cnxl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-21 23:10 +0300) wrote:

[...]

>> Really?  Can you show the output of:
>>
>>   time guix package -p /run/current-system/profile \
>>                     -p ~/.guix-profile --search-paths
>
> real	0m2.634s
> user	0m0.568s
> sys	0m0.080s

Could you measure again after cc3de1d?

As it turns out, =E2=80=98guix package=E2=80=99 loads way too much and also=
 stats too
much, at least for simple operations like --search-paths.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 23 Nov 2015 14:31:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 09:31:49 2015
Received: from localhost ([127.0.0.1]:49163 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0s9e-0007wk-DG
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2015 09:31:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41341)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a0s9H-0007vH-B9
 for 20255 <at> debbugs.gnu.org; Mon, 23 Nov 2015 09:31:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a0s9C-0006b2-VJ
 for 20255 <at> debbugs.gnu.org; Mon, 23 Nov 2015 09:31:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37612)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a0s9C-0006as-Ri; Mon, 23 Nov 2015 09:31:14 -0500
Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:37108 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a0s9C-0000Y0-8R; Mon, 23 Nov 2015 09:31:14 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <87lh9q1f2i.fsf@HIDDEN> <877fl9q3gv.fsf@HIDDEN>
 <87h9kdy6ty.fsf@HIDDEN> <871tbh53rt.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 3 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Mon, 23 Nov 2015 15:31:12 +0100
In-Reply-To: <871tbh53rt.fsf@HIDDEN> (Alex Kost's message of "Mon, 23 Nov
 2015 14:55:18 +0300")
Message-ID: <87vb8sss7j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-23 02:04 +0300) wrote:
>
>> Alex Kost <alezost@HIDDEN> skribis:
>>
>>> Ludovic Court=C3=A8s (2015-11-22 13:52 +0300) wrote:
>>
>> [...]
>>
>>> but it suits only the default case of a single user profile.  If I
>>> have several user profiles, it does nothing useful for me, only wastes
>>> the time.
>>
>> I think this is fine.  ~/.guix-profile is treated specially in many
>> ways.  I think users do not expect other profiles to be magically taken
>> into account.
>
> Yes, this is a good default option, all I wanted to say is if I don't
> use Guix in a default way, I would like to change this default option to
> suit my needs.

IMO this is beyond the scope of this discussion: /etc/profile already
sources ~/.guix-profile/etc/profile explicitly, and not anything else.

[...]

>>> =E2=80=A6 what I suggest now is just to give an option to avoid generat=
ing the
>>> default /etc/profile.  What about making an 'operating-system' field for
>>> this file (similar to 'sudoers-file' or 'hosts-file')?  So when such
>>> 'profile-file' is specified, it will be used instead of the default one
>>> (of course, it should be mentioned in the manual that it's only for
>>> those users who are sure what they do).
>>
>> I think we could make an /etc/profile-service that receives snippets
>> meant to be glued together into the final /etc/profile.  Users could
>> specify the top or bottom of the file.
>>
>> There could be a combined-search-paths-service that implements the
>> solution I proposed here.
>>
>> WDYT?
>
> I agree, the more ways to change a default behaviour, the better.
> Although I will not use these things if there will be =E2=80=98profile-fi=
le=E2=80=99
> field that allows to specify my own "/etc/profile".

[...]

> Great!  So is it OK to send a patch for adding =E2=80=98profile-file=E2=
=80=99 field?

Hmm, I=E2=80=99m not sure if we want to give direct access to /etc/profile =
like
this.

The problem is that several things in there are here to make the system
work, and to to make it conform to the =E2=80=98operating-system=E2=80=99 d=
eclaration,
such as:

--8<---------------cut here---------------start------------->8---
export LANG=3D"en_US.utf8"
export TZ=3D"Europe/Paris"
export TZDIR=3D"/gnu/store/rwvf6xqgsyb8bmpi7rwk9fildnwvzrv5-tzdata-2015c/sh=
are/zoneinfo"

# Tell 'modprobe' & co. where to look for modules.
export LINUX_MODULE_DIRECTORY=3D/run/booted-system/kernel/lib/modules
--8<---------------cut here---------------end--------------->8---

The risk I see with adding a raw =E2=80=98profile-file=E2=80=99 option is t=
hat newcomers
may end up getting rid of such things without really noticing, and then
getting a broken system.

What about instead giving a way to populate the top and/or bottom of
this file?  Controversial parts, if any, could still be turned on and
off by adding or removing services that add these lines?

I think we should open a separate bug report to discuss this.

>>  But I think it=E2=80=99s also
>> important to discuss the defaults, to make sure they are acceptable to
>> many and that they improve the =E2=80=9Cuser experience.=E2=80=9D
>
> I'm probably not the person to discuss the defaults, as very often I
> find defaults inappropriate.

Understood.  I=E2=80=99m sure you=E2=80=99ll understand, though, that it=E2=
=80=99s in the
interest of the project and its users to provide a good user experience
firsthand.

Thanks for your feedback,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 23 Nov 2015 11:55:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 06:55:41 2015
Received: from localhost ([127.0.0.1]:49010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0pie-0000be-Lq
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2015 06:55:41 -0500
Received: from mail-lf0-f50.google.com ([209.85.215.50]:35879)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1a0piK-0000b9-4R
 for 20255 <at> debbugs.gnu.org; Mon, 23 Nov 2015 06:55:38 -0500
Received: by lfs39 with SMTP id 39so105772115lfs.3
 for <20255 <at> debbugs.gnu.org>; Mon, 23 Nov 2015 03:55:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=e64FRDSvAe3V4w87T6SIxJdNIVhWT15bepedRCxhUKg=;
 b=irkNsnao6BUWg8IFIQcAje8LWnL8PSJr/BmWwKCvgUFJ7LLoMrIDgVUXXb2tDSEI7z
 mE1As+HrHqhorQbmtMOEJyNZUUVSARgKs0aed8ZBDcJ0EoGBBlcPjavKWm3XbZqcPY6+
 p7h89TF6JhtAWXFIDprEI2mlsWnl7EryUZuYjsgJgm9isrzTwiQvBQLRk0lZfkXqGgSd
 OjvgVCp8V43vWeU2RsKeTS+kaX/0A8Fo7DO88Y14zfINYqxa2r7qz51L8n2a+ADjaaGj
 AXCPazgjgqtVE0NadCW/VG7s+rH6a6ZapltEK0PAQRDRVXWxGqltMyV17Xb3cYz3EQnK
 3P3A==
X-Received: by 10.25.39.19 with SMTP id n19mr8571247lfn.156.1448279719117;
 Mon, 23 Nov 2015 03:55:19 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id g5sm1757469lbd.26.2015.11.23.03.55.18
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 23 Nov 2015 03:55:18 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <87lh9q1f2i.fsf@HIDDEN> <877fl9q3gv.fsf@HIDDEN>
 <87h9kdy6ty.fsf@HIDDEN>
Date: Mon, 23 Nov 2015 14:55:18 +0300
In-Reply-To: <87h9kdy6ty.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Mon, 23 Nov 2015 00:04:09 +0100")
Message-ID: <871tbh53rt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-23 02:04 +0300) wrote:

> Alex Kost <alezost@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s (2015-11-22 13:52 +0300) wrote:
>
> [...]
>
>> but it suits only the default case of a single user profile.  If I
>> have several user profiles, it does nothing useful for me, only wastes
>> the time.
>
> I think this is fine.  ~/.guix-profile is treated specially in many
> ways.  I think users do not expect other profiles to be magically taken
> into account.

Yes, this is a good default option, all I wanted to say is if I don't
use Guix in a default way, I would like to change this default option to
suit my needs.

>>> What would you suggest?
>>
>> After all, I realized what is my main concern: "/etc/profile" is
>> non-editable.  If I don't like some pieces of this file, I can do
>> nothing, and I just have to live with it and suffer.  Ideally I would
>> like to decide what pieces I want to put in /etc/profile and what I
>> don't.  But it's probably not possible, so=E2=80=A6
>>
>> =E2=80=A6 what I suggest now is just to give an option to avoid generati=
ng the
>> default /etc/profile.  What about making an 'operating-system' field for
>> this file (similar to 'sudoers-file' or 'hosts-file')?  So when such
>> 'profile-file' is specified, it will be used instead of the default one
>> (of course, it should be mentioned in the manual that it's only for
>> those users who are sure what they do).
>
> I think we could make an /etc/profile-service that receives snippets
> meant to be glued together into the final /etc/profile.  Users could
> specify the top or bottom of the file.
>
> There could be a combined-search-paths-service that implements the
> solution I proposed here.
>
> WDYT?

I agree, the more ways to change a default behaviour, the better.
Although I will not use these things if there will be =E2=80=98profile-file=
=E2=80=99
field that allows to specify my own "/etc/profile".

>> If this 'profile-file' field appears, I will gladly use it, and I will
>> not object to any future changes in /etc/profile.
>
> Of course we want to offer this flexibility.

Great!  So is it OK to send a patch for adding =E2=80=98profile-file=E2=80=
=99 field?

>  But I think it=E2=80=99s also
> important to discuss the defaults, to make sure they are acceptable to
> many and that they improve the =E2=80=9Cuser experience.=E2=80=9D

I'm probably not the person to discuss the defaults, as very often I
find defaults inappropriate.  For example, invoking "guix package
--search-paths" in /etc/profile is a totally unacceptable default for
me (sorry for mentioning it all the time :-))

--=20
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 22 Nov 2015 23:04:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 22 18:04:39 2015
Received: from localhost ([127.0.0.1]:48631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0dgU-00063v-4F
	for submit <at> debbugs.gnu.org; Sun, 22 Nov 2015 18:04:38 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46539)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a0dg9-00063O-AJ
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 18:04:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a0dg4-0004kQ-3I
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 18:04:17 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53478)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a0dg4-0004kM-01; Sun, 22 Nov 2015 18:04:12 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:49452 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a0dg3-0004Co-BR; Sun, 22 Nov 2015 18:04:11 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <87lh9q1f2i.fsf@HIDDEN> <877fl9q3gv.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 2 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Mon, 23 Nov 2015 00:04:09 +0100
In-Reply-To: <877fl9q3gv.fsf@HIDDEN> (Alex Kost's message of "Sun, 22 Nov
 2015 21:44:00 +0300")
Message-ID: <87h9kdy6ty.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-22 13:52 +0300) wrote:

[...]

>> To me, what =E5=AE=8B=E6=96=87=E6=AD=A6 reported at the beginning of thi=
s thread is a
>> usability issue.  We=E2=80=99ve hacked around it so far, but we know the=
re are
>> cases where the hacks aren=E2=80=99t enough.
>>
>> We could declare it as =E2=80=9Cwon=E2=80=99t fix=E2=80=9D, but I=E2=80=
=99m not comfortable with that.
>
> No, no, I'm against =E2=80=9Cwon't fix=E2=80=9D.  I don't mind if it's ca=
lled a bug, and
> a solution you suggest is the best,

OK.

> but it suits only the default case of a single user profile.  If I
> have several user profiles, it does nothing useful for me, only wastes
> the time.

I think this is fine.  ~/.guix-profile is treated specially in many
ways.  I think users do not expect other profiles to be magically taken
into account.

> OK, for the bug at hand, invoking "guix package --search-paths" looks
> like the only possible solution, but please don't commit this patch
> without giving a user a chance to decide what to put in /etc/profile.

OK.

>> The solution I came up with might be inadequate.  Then we need to come
>> up with an alternate proposal, or to resign and mark it as =E2=80=9Cwont=
fix.=E2=80=9D
>
> It is adequate and I'm not against it.

OK.  To me, that it takes 2 seconds on your machines suggests that it=E2=80=
=99s
not great either.

>> What would you suggest?
>
> After all, I realized what is my main concern: "/etc/profile" is
> non-editable.  If I don't like some pieces of this file, I can do
> nothing, and I just have to live with it and suffer.  Ideally I would
> like to decide what pieces I want to put in /etc/profile and what I
> don't.  But it's probably not possible, so=E2=80=A6
>
> =E2=80=A6 what I suggest now is just to give an option to avoid generatin=
g the
> default /etc/profile.  What about making an 'operating-system' field for
> this file (similar to 'sudoers-file' or 'hosts-file')?  So when such
> 'profile-file' is specified, it will be used instead of the default one
> (of course, it should be mentioned in the manual that it's only for
> those users who are sure what they do).

I think we could make an /etc/profile-service that receives snippets
meant to be glued together into the final /etc/profile.  Users could
specify the top or bottom of the file.

There could be a combined-search-paths-service that implements the
solution I proposed here.

WDYT?

> If this 'profile-file' field appears, I will gladly use it, and I will
> not object to any future changes in /etc/profile.

Of course we want to offer this flexibility.  But I think it=E2=80=99s also
important to discuss the defaults, to make sure they are acceptable to
many and that they improve the =E2=80=9Cuser experience.=E2=80=9D

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 22 Nov 2015 18:44:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 22 13:44:06 2015
Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0ZcM-0007p5-4r
	for submit <at> debbugs.gnu.org; Sun, 22 Nov 2015 13:44:06 -0500
Received: from mail-lf0-f43.google.com ([209.85.215.43]:35511)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1a0ZcJ-0007ow-H1
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 13:44:04 -0500
Received: by lfdl133 with SMTP id l133so14554063lfd.2
 for <20255 <at> debbugs.gnu.org>; Sun, 22 Nov 2015 10:44:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=eFGiOv9zK8gJykCXkbE2YszzgkyUu/bxQSgKjPHDn08=;
 b=QpTegTzWVRb3NnuTCC/lnOWGwdECMmRsJJpIdYICaNPg9rfVYu5QFlEqYDaR88t8z0
 t+aJzfAeknVHVtNA0Xjc+49bW6GvA7CWVhizOBKteudtG+HnxFeW6sGnGAOxopfLmfec
 NCSJSlGeyP4LMhTkGBev3yvexPZmm4Z4XDie7ewNh55tHVZ+ZYH3slzV0S/UZnMajOF0
 i8fbou8JCF1zE1qhLUFPFpr2CKtbPm4YkPa2epaaKtE12RHDTl2gAgjIWvt1pA9DXGGv
 Mt93A+EZiobpAZ5WhfTS2m8VH4YujXkcW4lyotG5Hzt6qtvDWRX1MFL2NcaxAUv8byy7
 iuqw==
X-Received: by 10.25.21.70 with SMTP id l67mr7759908lfi.27.1448217842519;
 Sun, 22 Nov 2015 10:44:02 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id l81sm1148934lfb.40.2015.11.22.10.44.01
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 22 Nov 2015 10:44:01 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
 <87lh9q1f2i.fsf@HIDDEN>
Date: Sun, 22 Nov 2015 21:44:00 +0300
In-Reply-To: <87lh9q1f2i.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sun, 22 Nov 2015 11:52:37 +0100")
Message-ID: <877fl9q3gv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-22 13:52 +0300) wrote:

> Alex Kost <alezost@HIDDEN> skribis:
>
>>>> At first, because of the slowdown: it may be a few hundred milliseconds
>>>> for you, but it's several seconds for me.
>>>
>>> Really?  Can you show the output of:
>>>
>>>   time guix package -p /run/current-system/profile \
>>>                     -p ~/.guix-profile --search-paths
>>
>> real	0m2.634s
>> user	0m0.568s
>> sys	0m0.080s
>
> Ouch, that=E2=80=99s a problem.  This suggests that this is 2 seconds of =
I/O.
> I=E2=80=99m not sure what can be done to improve that.
>
>>> In the discussion of this bug, we tried hard to avoid resorting to
>>> invoking a program, but ultimately no other solution came out.
>>
>> I don't need a solution for this bug, I just want to have an option to
>> avoid invoking "guix package --search-paths" in my "/etc/profile".
>
> Are you denying that this is a bug?  Are you denying that there=E2=80=99s=
 a
> usability issue at hand?

I agree it's a usability issue.

> To me, what =E5=AE=8B=E6=96=87=E6=AD=A6 reported at the beginning of this=
 thread is a
> usability issue.  We=E2=80=99ve hacked around it so far, but we know ther=
e are
> cases where the hacks aren=E2=80=99t enough.
>
> We could declare it as =E2=80=9Cwon=E2=80=99t fix=E2=80=9D, but I=E2=80=
=99m not comfortable with that.

No, no, I'm against =E2=80=9Cwon't fix=E2=80=9D.  I don't mind if it's call=
ed a bug, and
a solution you suggest is the best, but it suits only the default case
of a single user profile.  If I have several user profiles, it does
nothing useful for me, only wastes the time.

>>>> For example, when I do:
>>>>
>>>>   GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm
>>>>
>>>> the "etc/profile" of the built system will not contain those 'eval ...'
>>>> lines.  WDYT?
>>>
>>> This would be unreasonable.  We=E2=80=99re talking about a basic featur=
e here.
>>> If basic features are broken to the point that we prefer to offer ways
>>> to bypass them, and have a semi-broken system, then there=E2=80=99s a p=
roblem,
>>> IMO.
>>
>> Sorry, but I would really like to bypass this feature
>
> [...]
>
> I very well understand your concern, so thanks for chiming in.
> Please let=E2=80=99s also consider the bug at hand.

OK, for the bug at hand, invoking "guix package --search-paths" looks
like the only possible solution, but please don't commit this patch
without giving a user a chance to decide what to put in /etc/profile.

> The solution I came up with might be inadequate.  Then we need to come
> up with an alternate proposal, or to resign and mark it as =E2=80=9Cwontf=
ix.=E2=80=9D

It is adequate and I'm not against it.

> What would you suggest?

After all, I realized what is my main concern: "/etc/profile" is
non-editable.  If I don't like some pieces of this file, I can do
nothing, and I just have to live with it and suffer.  Ideally I would
like to decide what pieces I want to put in /etc/profile and what I
don't.  But it's probably not possible, so=E2=80=A6

=E2=80=A6 what I suggest now is just to give an option to avoid generating =
the
default /etc/profile.  What about making an 'operating-system' field for
this file (similar to 'sudoers-file' or 'hosts-file')?  So when such
'profile-file' is specified, it will be used instead of the default one
(of course, it should be mentioned in the manual that it's only for
those users who are sure what they do).

If this 'profile-file' field appears, I will gladly use it, and I will
not object to any future changes in /etc/profile.

--=20
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 22 Nov 2015 10:53:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 22 05:53:04 2015
Received: from localhost ([127.0.0.1]:47660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0SGV-0001m0-Ri
	for submit <at> debbugs.gnu.org; Sun, 22 Nov 2015 05:53:04 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43163)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a0SGC-0001l7-6V
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 05:53:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a0SG8-0007L5-Le
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 05:52:43 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40975)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a0SG8-0007L1-If; Sun, 22 Nov 2015 05:52:40 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:60590 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a0SG8-0008V0-1w; Sun, 22 Nov 2015 05:52:40 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN> <87r3jisc76.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 2 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sun, 22 Nov 2015 11:52:37 +0100
In-Reply-To: <87r3jisc76.fsf@HIDDEN> (Alex Kost's message of "Sun, 22 Nov
 2015 10:52:29 +0300")
Message-ID: <87lh9q1f2i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

>>> At first, because of the slowdown: it may be a few hundred milliseconds
>>> for you, but it's several seconds for me.
>>
>> Really?  Can you show the output of:
>>
>>   time guix package -p /run/current-system/profile \
>>                     -p ~/.guix-profile --search-paths
>
> real	0m2.634s
> user	0m0.568s
> sys	0m0.080s

Ouch, that=E2=80=99s a problem.  This suggests that this is 2 seconds of I/=
O.
I=E2=80=99m not sure what can be done to improve that.

>> In the discussion of this bug, we tried hard to avoid resorting to
>> invoking a program, but ultimately no other solution came out.
>
> I don't need a solution for this bug, I just want to have an option to
> avoid invoking "guix package --search-paths" in my "/etc/profile".

Are you denying that this is a bug?  Are you denying that there=E2=80=99s a
usability issue at hand?

To me, what =E5=AE=8B=E6=96=87=E6=AD=A6 reported at the beginning of this t=
hread is a
usability issue.  We=E2=80=99ve hacked around it so far, but we know there =
are
cases where the hacks aren=E2=80=99t enough.

We could declare it as =E2=80=9Cwon=E2=80=99t fix=E2=80=9D, but I=E2=80=99m=
 not comfortable with that.

>>> For example, when I do:
>>>
>>>   GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm
>>>
>>> the "etc/profile" of the built system will not contain those 'eval ...'
>>> lines.  WDYT?
>>
>> This would be unreasonable.  We=E2=80=99re talking about a basic feature=
 here.
>> If basic features are broken to the point that we prefer to offer ways
>> to bypass them, and have a semi-broken system, then there=E2=80=99s a pr=
oblem,
>> IMO.
>
> Sorry, but I would really like to bypass this feature

[...]

I very well understand your concern, so thanks for chiming in.
Please let=E2=80=99s also consider the bug at hand.

The solution I came up with might be inadequate.  Then we need to come
up with an alternate proposal, or to resign and mark it as =E2=80=9Cwontfix=
.=E2=80=9D

What would you suggest?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 22 Nov 2015 07:52:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 22 02:52:50 2015
Received: from localhost ([127.0.0.1]:47592 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0PS6-0005Y0-1N
	for submit <at> debbugs.gnu.org; Sun, 22 Nov 2015 02:52:50 -0500
Received: from mail-lf0-f53.google.com ([209.85.215.53]:32967)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1a0PRl-0005XX-PU
 for 20255 <at> debbugs.gnu.org; Sun, 22 Nov 2015 02:52:49 -0500
Received: by lfaz4 with SMTP id z4so91263017lfa.0
 for <20255 <at> debbugs.gnu.org>; Sat, 21 Nov 2015 23:52:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=xCOo0R+oQD3otLzq3nwj2q64d3VXmMorE0YCoUgVmQg=;
 b=FpLIY9vGiRRl+7ZW6SBDs5wEQ0dhGcPqcAMMK6n2KQ9JjfAvTmiRmfdWo3NmMCd8WK
 a552rU8caRgR1VGf9nOV4rqXF9cKHGdO4CdSAvICQXIPtuYTBk9PIJg2NWHOo/OvGrwj
 /zK+09wSAIaFiKkXi2QbFlUQwQ6lkroPySD8YXS9NwExQj0VPwYtiNBCAnRSWHOFrV04
 cqPQI0LcVFP8Rv+FAcBRME9GweLvjaGSswwsn4ZDtXl/UumNqfNF66wYCWPWgKsdyEYu
 iF+gEMd4s6X8DRjYbcJUrGcxB2DvtWbgo7UaxG9QwD/tywplFfKL5ISERs3MKqP23Zss
 jS+Q==
X-Received: by 10.25.86.9 with SMTP id k9mr9009116lfb.36.1448178748766;
 Sat, 21 Nov 2015 23:52:28 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id e9sm1022295lbs.13.2015.11.21.23.52.27
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 21 Nov 2015 23:52:28 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
 <87wptb5d1y.fsf@HIDDEN>
Date: Sun, 22 Nov 2015 10:52:29 +0300
In-Reply-To: <87wptb5d1y.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sat, 21 Nov 2015 21:10:17 +0100")
Message-ID: <87r3jisc76.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-21 23:10 +0300) wrote:

> Alex Kost <alezost@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s (2015-11-21 11:57 +0300) wrote:
>>
>>> Alex Kost <alezost@HIDDEN> skribis:
>>>
>>>> Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote:
>>>>
>>>>> -# Load the system profile's settings.
>>>>> +if [ -x /run/current-system/profile/bin/guix ]
>>>>> +then
>>>>> +  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing=
 from the
>>>>> +  # profiles' individual 'etc/profile'.  Thus, combine both profiles=
 when
>>>>> +  # computing the search paths.
>>>>> +  #
>>>>> +  # This may take a few hundred milliseconds, but it's OK because th=
is is
>>>>> +  # performed for log-in shells only.
>>>>> +  eval `/run/current-system/profile/bin/guix package \\
>>>>> +          -p /run/current-system/profile             \\
>>>>> +          -p \"$HOME/.guix-profile\" --search-paths`
>>>>
>>>> Sorry, but it's not OK for me.  As a user, I'm *strongly* against
>>>> running 'guix' (or any other program) in /etc/profile.
>>>
>>> Why?  (Honest question.)
>>
>> At first, because of the slowdown: it may be a few hundred milliseconds
>> for you, but it's several seconds for me.
>
> Really?  Can you show the output of:
>
>   time guix package -p /run/current-system/profile \
>                     -p ~/.guix-profile --search-paths

real	0m2.634s
user	0m0.568s
sys	0m0.080s

Of course, on the second run the real time reduces (for me it's about
0.5), as HDD already "knows" what I want, but since it is for login
shell, it will always be 2-3 seconds because of HDD.

>> But actually, even if it was several milliseconds, I still wouldn't
>> like it, as (IMHO) /etc/profile should only set variables, and not run
>> external programs.
>
> I don=E2=80=99t buy this =E2=80=9Cprinciple=E2=80=9D: /etc/profile is a p=
rogram, and the output
> of --search-paths is trusted to contain only environment variable
> setting.

Sure, it's just my opinion (OK, let call it "faith"): I consider running
external programs in "/etc/profile" malicious.

> In the discussion of this bug, we tried hard to avoid resorting to
> invoking a program, but ultimately no other solution came out.

I don't need a solution for this bug, I just want to have an option to
avoid invoking "guix package --search-paths" in my "/etc/profile".

>>>> I would really like to have an option to avoid this.  Is it possible?
>>>
>>> Not that I know of.  Please read <http://bugs.gnu.org/20255>.
>>
>> What about making some environment variable which will be honored by
>> 'operating-system-etc-service' procedure.  So depending on this variable
>> that 'eval ...' command will or will not be added to "/etc/profile"
>> during 'guix system ...' process.
>>
>> For example, when I do:
>>
>>   GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm
>>
>> the "etc/profile" of the built system will not contain those 'eval ...'
>> lines.  WDYT?
>
> This would be unreasonable.  We=E2=80=99re talking about a basic feature =
here.
> If basic features are broken to the point that we prefer to offer ways
> to bypass them, and have a semi-broken system, then there=E2=80=99s a pro=
blem,
> IMO.

Sorry, but I would really like to bypass this feature, as I don't like
it.  For me, what you suggest sounds: =C2=ABWe'll not give a freedom to a
user to disable this feature, because we know better what is good for
him/her=C2=BB.  All I ask is to give me such a freedom.

Using --search-paths with several profiles is a great feature (thank you
for it!) and I like it, but consider the following use-case: for some
reason I like to manage several profiles instead of a single
"~/.guix-profile", so I can put:

eval `guix package -p /run/current-system/profile \
                   -p ~/.guix-profile \
                   -p ~/my-guix-profiles/foo \
                   -p ~/my-guix-profiles/bar \
                   --search-paths`

in my "~/.bash_profile".  So I don't like to have the same command but
only for 2 profiles in my "/etc/profile".  Please, give me an option to
disable this feature.

--=20
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 21 Nov 2015 20:10:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 21 15:10:27 2015
Received: from localhost ([127.0.0.1]:47322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0EUM-0007ci-Ml
	for submit <at> debbugs.gnu.org; Sat, 21 Nov 2015 15:10:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36872)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a0EUK-0007cS-8G
 for 20255 <at> debbugs.gnu.org; Sat, 21 Nov 2015 15:10:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a0EUG-0004Vy-RO
 for 20255 <at> debbugs.gnu.org; Sat, 21 Nov 2015 15:10:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60291)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a0EUG-0004Vu-OK; Sat, 21 Nov 2015 15:10:20 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:55204 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a0EUF-0007Ar-W3; Sat, 21 Nov 2015 15:10:20 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN> <874mgfkxee.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 1 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 21 Nov 2015 21:10:17 +0100
In-Reply-To: <874mgfkxee.fsf@HIDDEN> (Alex Kost's message of "Sat, 21 Nov
 2015 21:41:45 +0300")
Message-ID: <87wptb5d1y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-21 11:57 +0300) wrote:
>
>> Alex Kost <alezost@HIDDEN> skribis:
>>
>>> Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote:
>>>
>>>> -# Load the system profile's settings.
>>>> +if [ -x /run/current-system/profile/bin/guix ]
>>>> +then
>>>> +  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing =
from the
>>>> +  # profiles' individual 'etc/profile'.  Thus, combine both profiles =
when
>>>> +  # computing the search paths.
>>>> +  #
>>>> +  # This may take a few hundred milliseconds, but it's OK because thi=
s is
>>>> +  # performed for log-in shells only.
>>>> +  eval `/run/current-system/profile/bin/guix package \\
>>>> +          -p /run/current-system/profile             \\
>>>> +          -p \"$HOME/.guix-profile\" --search-paths`
>>>
>>> Sorry, but it's not OK for me.  As a user, I'm *strongly* against
>>> running 'guix' (or any other program) in /etc/profile.
>>
>> Why?  (Honest question.)
>
> At first, because of the slowdown: it may be a few hundred milliseconds
> for you, but it's several seconds for me.

Really?  Can you show the output of:

  time guix package -p /run/current-system/profile \
                    -p ~/.guix-profile --search-paths

?

> But actually, even if it was several milliseconds, I still wouldn't
> like it, as (IMHO) /etc/profile should only set variables, and not run
> external programs.

I don=E2=80=99t buy this =E2=80=9Cprinciple=E2=80=9D: /etc/profile is a pro=
gram, and the output
of --search-paths is trusted to contain only environment variable
setting.

In the discussion of this bug, we tried hard to avoid resorting to
invoking a program, but ultimately no other solution came out.

>>> I would really like to have an option to avoid this.  Is it possible?
>>
>> Not that I know of.  Please read <http://bugs.gnu.org/20255>.
>
> What about making some environment variable which will be honored by
> 'operating-system-etc-service' procedure.  So depending on this variable
> that 'eval ...' command will or will not be added to "/etc/profile"
> during 'guix system ...' process.
>
> For example, when I do:
>
>   GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm
>
> the "etc/profile" of the built system will not contain those 'eval ...'
> lines.  WDYT?

This would be unreasonable.  We=E2=80=99re talking about a basic feature he=
re.
If basic features are broken to the point that we prefer to offer ways
to bypass them, and have a semi-broken system, then there=E2=80=99s a probl=
em,
IMO.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 21 Nov 2015 18:41:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 21 13:41:48 2015
Received: from localhost ([127.0.0.1]:47286 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a0D6Z-0005Ek-N8
	for submit <at> debbugs.gnu.org; Sat, 21 Nov 2015 13:41:48 -0500
Received: from mail-lf0-f41.google.com ([209.85.215.41]:34920)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1a0D6X-0005Eb-9M
 for 20255 <at> debbugs.gnu.org; Sat, 21 Nov 2015 13:41:45 -0500
Received: by lfdl133 with SMTP id l133so5784790lfd.2
 for <20255 <at> debbugs.gnu.org>; Sat, 21 Nov 2015 10:41:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=NACuNREA4/mLCU/oYkkHrW/OVuCq+G/NUC/NpjmXVDA=;
 b=MCz79d7Gsey9NtkeMtH2kdTfgyMdUEz/Xmp4hMhs5wwPHRuifOPUPZ+bD7qKa2uax0
 FwvCTjkGte7uYEUl3Bt0KEz2ydtleL8MYKoOQhOrjB3eEyueDAA699RPwI+7WZDp8ziY
 rfVcXUSCL5K5PtehJjBpjEzdvdTRhl+ARg75IZSgpxd1a5SDTJBKL58+gO+HFPN9kJC9
 qYOtQ//mdQJNohfnJ/9ihER7+89ZDmc6m6/96Gj/8mDwWnl3FAoRdCOtdZ8P86wq9oOa
 kcrbz5l1XF922MmYaPMtappLXfsYlwN3SsE9cuGQ3P7+IzSVd/l9ms8W/LVui6BeH+l0
 GgMA==
X-Received: by 10.25.169.212 with SMTP id s203mr6723036lfe.134.1448131304252; 
 Sat, 21 Nov 2015 10:41:44 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id 42sm723778lfv.29.2015.11.21.10.41.43
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 21 Nov 2015 10:41:43 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
 <87ziy7d90z.fsf@HIDDEN>
Date: Sat, 21 Nov 2015 21:41:45 +0300
In-Reply-To: <87ziy7d90z.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sat, 21 Nov 2015 09:57:48 +0100")
Message-ID: <874mgfkxee.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-21 11:57 +0300) wrote:

> Alex Kost <alezost@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote:
>>
>>> -# Load the system profile's settings.
>>> +if [ -x /run/current-system/profile/bin/guix ]
>>> +then
>>> +  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing f=
rom the
>>> +  # profiles' individual 'etc/profile'.  Thus, combine both profiles w=
hen
>>> +  # computing the search paths.
>>> +  #
>>> +  # This may take a few hundred milliseconds, but it's OK because this=
 is
>>> +  # performed for log-in shells only.
>>> +  eval `/run/current-system/profile/bin/guix package \\
>>> +          -p /run/current-system/profile             \\
>>> +          -p \"$HOME/.guix-profile\" --search-paths`
>>
>> Sorry, but it's not OK for me.  As a user, I'm *strongly* against
>> running 'guix' (or any other program) in /etc/profile.
>
> Why?  (Honest question.)

At first, because of the slowdown: it may be a few hundred milliseconds
for you, but it's several seconds for me.  But actually, even if it was
several milliseconds, I still wouldn't like it, as (IMHO) /etc/profile
should only set variables, and not run external programs.

>> I would really like to have an option to avoid this.  Is it possible?
>
> Not that I know of.  Please read <http://bugs.gnu.org/20255>.

What about making some environment variable which will be honored by
'operating-system-etc-service' procedure.  So depending on this variable
that 'eval ...' command will or will not be added to "/etc/profile"
during 'guix system ...' process.

For example, when I do:

  GUIX_IGNORE_SYSTEM_PROFILE_ENV=3D1 guix system build my-config.scm

the "etc/profile" of the built system will not contain those 'eval ...'
lines.  WDYT?

--=20
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 21 Nov 2015 08:58:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 21 03:58:16 2015
Received: from localhost ([127.0.0.1]:46613 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a03zr-0004qx-Qs
	for submit <at> debbugs.gnu.org; Sat, 21 Nov 2015 03:58:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38726)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1a03zX-0004qD-AH
 for 20255 <at> debbugs.gnu.org; Sat, 21 Nov 2015 03:58:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1a03zT-0001id-Ma
 for 20255 <at> debbugs.gnu.org; Sat, 21 Nov 2015 03:57:54 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53551)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1a03zT-0001iZ-J1; Sat, 21 Nov 2015 03:57:51 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:44626 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1a03zS-00045O-UH; Sat, 21 Nov 2015 03:57:51 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Alex Kost <alezost@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN> <87h9kguwc4.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 1 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 21 Nov 2015 09:57:48 +0100
In-Reply-To: <87h9kguwc4.fsf@HIDDEN> (Alex Kost's message of "Sat, 21 Nov
 2015 01:42:19 +0300")
Message-ID: <87ziy7d90z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>, 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Alex Kost <alezost@HIDDEN> skribis:

> Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote:
>
>> -# Load the system profile's settings.
>> +if [ -x /run/current-system/profile/bin/guix ]
>> +then
>> +  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing fr=
om the
>> +  # profiles' individual 'etc/profile'.  Thus, combine both profiles wh=
en
>> +  # computing the search paths.
>> +  #
>> +  # This may take a few hundred milliseconds, but it's OK because this =
is
>> +  # performed for log-in shells only.
>> +  eval `/run/current-system/profile/bin/guix package \\
>> +          -p /run/current-system/profile             \\
>> +          -p \"$HOME/.guix-profile\" --search-paths`
>
> Sorry, but it's not OK for me.  As a user, I'm *strongly* against
> running 'guix' (or any other program) in /etc/profile.

Why?  (Honest question.)

> I would really like to have an option to avoid this.  Is it possible?

Not that I know of.  Please read <http://bugs.gnu.org/20255>.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 20 Nov 2015 22:42:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 20 17:42:22 2015
Received: from localhost ([127.0.0.1]:46511 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZzuNp-0006yS-Le
	for submit <at> debbugs.gnu.org; Fri, 20 Nov 2015 17:42:21 -0500
Received: from mail-lb0-f169.google.com ([209.85.217.169]:34614)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1ZzuNn-0006yH-GQ
 for 20255 <at> debbugs.gnu.org; Fri, 20 Nov 2015 17:42:20 -0500
Received: by lbbcs9 with SMTP id cs9so69778727lbb.1
 for <20255 <at> debbugs.gnu.org>; Fri, 20 Nov 2015 14:42:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=WD9nAS/upbbUJ69IpoKrkPPYEMDoGyE+4tpEs9ypiN8=;
 b=UJDiRSUeWL8vtHS7c4qxQIXS4m+FWUD48sPEv4tMLRJ+4BZcWFdJ/5Ny6D2qvtb1Gw
 z9vzDePXpVpNjFW3ilm9VI+QCrwYPuYLp++A1U070sIjMgbLAryalIlEk1YHBV/jBJtv
 P5ahotJUutI+zCV/F3u4OEYz2Nz/xH+NT8+HmPvBgmVB0zPdBpbrAilIQ1d8VPeSKsHO
 1taSO+JFUazqab+VlmcqcwWO3ZJS242fR8dQ7xF8FxDjTNzrLMLdWnoyEFRBZgfT8pls
 PsB4vneLR1vHZNf7wtwm2vsASfUJKPMfYdcJY9yWw6sicpacW4C/RkiZWvMq/tBgxEWa
 GBRg==
X-Received: by 10.112.205.10 with SMTP id lc10mr6717992lbc.31.1448059338664;
 Fri, 20 Nov 2015 14:42:18 -0800 (PST)
Received: from leviafan ([217.107.192.146])
 by smtp.gmail.com with ESMTPSA id ea3sm191210lbc.18.2015.11.20.14.42.17
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 20 Nov 2015 14:42:18 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
 <87lh9tvcws.fsf@HIDDEN>
Date: Sat, 21 Nov 2015 01:42:19 +0300
In-Reply-To: <87lh9tvcws.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Thu, 19 Nov 2015 23:32:03 +0100")
Message-ID: <87h9kguwc4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>, 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s (2015-11-20 01:32 +0300) wrote:

> -# Load the system profile's settings.
> +if [ -x /run/current-system/profile/bin/guix ]
> +then
> +  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing fro=
m the
> +  # profiles' individual 'etc/profile'.  Thus, combine both profiles when
> +  # computing the search paths.
> +  #
> +  # This may take a few hundred milliseconds, but it's OK because this is
> +  # performed for log-in shells only.
> +  eval `/run/current-system/profile/bin/guix package \\
> +          -p /run/current-system/profile             \\
> +          -p \"$HOME/.guix-profile\" --search-paths`

Sorry, but it's not OK for me.  As a user, I'm *strongly* against
running 'guix' (or any other program) in /etc/profile.  I would really
like to have an option to avoid this.  Is it possible?

--=20
Thanks,
Alex




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 19 Nov 2015 22:32:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 19 17:32:30 2015
Received: from localhost ([127.0.0.1]:45273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZzXkk-0001SS-1u
	for submit <at> debbugs.gnu.org; Thu, 19 Nov 2015 17:32:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42174)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1ZzXkQ-0001RO-0A
 for 20255 <at> debbugs.gnu.org; Thu, 19 Nov 2015 17:32:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1ZzXkM-0008Ex-BY
 for 20255 <at> debbugs.gnu.org; Thu, 19 Nov 2015 17:32:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35633)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1ZzXkM-0008Et-87; Thu, 19 Nov 2015 17:32:06 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:46114 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1ZzXkL-0004Fy-Jy; Thu, 19 Nov 2015 17:32:06 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN> <87ioca4ojo.fsf@HIDDEN>
Date: Thu, 19 Nov 2015 23:32:03 +0100
In-Reply-To: <87ioca4ojo.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sun, 03 May 2015 00:12:11 +0200")
Message-ID: <87lh9tvcws.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

ludo@HIDDEN (Ludovic Court=C3=A8s) skribis:

> =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:
>
>>> [...]
>>>>
>>>> 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 by 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?
>> I see, currently search-paths depends on the packages recipes. If we
>> update the related scheme code, then search-paths got updated, even we
>> didn't touch packages in profile at all.  It's a little confusing.
>> So I think we should encode the search-paths for each package in
>> manifest.
>
> Done in dedb17a.
>
> That will make it easier to generate environment variable settings.

Here=E2=80=99s the patch that does that, to try on b2a7223 or later.

Could you comment and give it a try?  My main concern was the latency
introduced at log-in shells, but it=E2=80=99s OK, at least on my i5+SSD lap=
top.

--8<---------------cut here---------------start------------->8---
$ time guix package -p ~/.guix-profile -p /run/current-system/profile --sea=
rch-paths > /dev/null

real    0m0.290s
user    0m0.372s
sys     0m0.028s
$ guix package -I | wc -l
215
$ guix package -p /run/current-system/profile -I | wc -l
43
--8<---------------cut here---------------end--------------->8---

I=E2=80=99ll push it soon if there are no objections.

TIA!

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/gnu/system.scm b/gnu/system.scm
index 2755d85..7d1d33e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -429,35 +429,49 @@ export SSL_CERT_DIR=/etc/ssl/certs
 export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\"
 export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\"
 
-# Crucial variables that could be missing in the profiles' 'etc/profile'
-# because they would require combining both profiles.
-# FIXME: See <http://bugs.gnu.org/20255>.
-export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man
-export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
+# Search paths for GLib schemas, GTK+ icons, and so on.
 export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share
 export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
 
 # Ignore the default value of 'PATH'.
 unset PATH
 
-# Load the system profile's settings.
+if [ -x /run/current-system/profile/bin/guix ]
+then
+  # Crucial variables such as 'MANPATH' or 'INFOPATH' may be missing from the
+  # profiles' individual 'etc/profile'.  Thus, combine both profiles when
+  # computing the search paths.
+  #
+  # This may take a few hundred milliseconds, but it's OK because this is
+  # performed for log-in shells only.
+  eval `/run/current-system/profile/bin/guix package \\
+          -p /run/current-system/profile             \\
+          -p \"$HOME/.guix-profile\" --search-paths`
+else
+  # In the unlikely case that Guix is not in the global profile,
+  # fall back to the simpler, yet less accurate method (see
+  # <http://bugs.gnu.org/20255>.)
   GUIX_PROFILE=/run/current-system/profile \\
   . /run/current-system/profile/etc/profile
 
-# Prepend setuid programs.
-export PATH=/run/setuid-programs:$PATH
-
   if [ -f \"$HOME/.guix-profile/etc/profile\" ]
   then
     # Load the user profile's settings.
     GUIX_PROFILE=\"$HOME/.guix-profile\" \\
     . \"$HOME/.guix-profile/etc/profile\"
-else
+  fi
+fi
+
+if [ ! -f \"$HOME/.guix-profile\" ]
+then
   # At least define this one so that basic things just work
   # when the user installs their first package.
   export PATH=\"$HOME/.guix-profile/bin:$PATH\"
 fi
 
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+
 # Append the directory of 'site-start.el' to the search path.
 export EMACSLOADPATH=:/etc/emacs
 

--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 12 Nov 2015 11:14:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 12 06:14:14 2015
Received: from localhost ([127.0.0.1]:34083 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZwppV-0003Qr-SQ
	for submit <at> debbugs.gnu.org; Thu, 12 Nov 2015 06:14:14 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45623)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1ZwppU-0003Qk-Ik
 for 20255 <at> debbugs.gnu.org; Thu, 12 Nov 2015 06:14:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1ZwppQ-0008Sg-PE
 for 20255 <at> debbugs.gnu.org; Thu, 12 Nov 2015 06:14:12 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49691)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1ZwppC-0008Qp-90; Thu, 12 Nov 2015 06:13:54 -0500
Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:49664 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1ZwppB-0008E4-GN; Thu, 12 Nov 2015 06:13:53 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <87lhh43tn0.fsf@HIDDEN>
Date: Thu, 12 Nov 2015 12:13:51 +0100
In-Reply-To: <87lhh43tn0.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Mon, 04 May 2015 23:44:19 +0200")
Message-ID: <87y4e3zd00.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.3 (-----)
X-Debbugs-Envelope-To: 20255
Cc: Mark H Weaver <mhw@HIDDEN>, 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.3 (-----)

Some progress has been made: fc2d233 allows search paths for multiple
profiles to be combined.

So I think I will eventually (=E2=80=98guix-devel=E2=80=99 needs to be upda=
ted first)
change /etc/profile to do:

  eval `guix package -p /run/current-system/profile \
          -p $HOME/.guix-profile --search-paths`

That should solve the combined profile issue.

This operation takes ~400ms on my machine.  This would be a problem if
we had to do it every time a shell is started, but here we only need to
do it for log-in shells, which is rare enough.

WDYT?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 6 May 2015 16:35:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 12:35:54 2015
Received: from localhost ([127.0.0.1]:36462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yq2Ib-0005VE-OZ
	for submit <at> debbugs.gnu.org; Wed, 06 May 2015 12:35:54 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:56751 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1Yq2IZ-0005V5-1L
 for 20255 <at> debbugs.gnu.org; Wed, 06 May 2015 12:35:51 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:43481 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1Yq2IY-0005B9-1C; Wed, 06 May 2015 12:35:50 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <87lhh43tn0.fsf@HIDDEN>
 <87k2wnqvga.fsf@HIDDEN>
Date: Wed, 06 May 2015 18:35:47 +0200
In-Reply-To: <87k2wnqvga.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Tue, 05 May 2015 16:28:53 +0800")
Message-ID: <87fv79u0ik.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:

> How about using a shell variable as input for the location:
> (replace /gnu/store/xxx with $GUIX_PROFILE)
>
>   # etc/profile
>   export PATH=3D$GUIX_PROFILE/bin:$PATH
>   export MANPATH=3D$GUIX_PROFILE/share/man:$MANPATH
>   ...
>
> Then when 'source' it, we pass the location:
> (we did know where $GUIX_PROFILE is when do the 'source')
>
>   # ~/.bash_profile
>   GUIX_PROFILE=3D$HOME/.guix-profile
>   if [ -f $GUIX_PROFILE/etc/profile ]; then
>     . $GUIX_PROFILE/etc/profile
>   fi
>
>   # /etc/profile
>   GUIX_PROFILE=3D/run/current-system/profile
>   source $GUIX_PROFILE/etc/profile

I ended up doing that in d664f1b.  Please check d664f1b and d995942 and
report and issues/bugs.

Part of the initial problem you reported had to do with combining
profiles (perl in one profile, perl-xml-parser in another.)  This part
is not addressed yet, and it turns out to be more common than I
initially thought: consider for instance MANPATH (with man-db installed
in the system profile and man pages in the user=E2=80=99s profile.)

Unfortunately the etc/profile files are not going to allow us to solve
that.  =E2=80=98guix package --search-paths=E2=80=99 could do the actual co=
mbination,
though.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 5 May 2015 12:35:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 05 08:35:14 2015
Received: from localhost ([127.0.0.1]:34435 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Ypc45-0008M7-Ku
	for submit <at> debbugs.gnu.org; Tue, 05 May 2015 08:35:14 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:36401 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1Ypc3z-0008Lv-Mx
 for 20255 <at> debbugs.gnu.org; Tue, 05 May 2015 08:35:08 -0400
Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:49167 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1Ypc3y-0006EZ-UY; Tue, 05 May 2015 08:35:03 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <87lhh43tn0.fsf@HIDDEN>
 <87k2wnqvga.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 16 =?utf-8?Q?Flor=C3=A9al?= an 223 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Tue, 05 May 2015 14:35:01 +0200
In-Reply-To: <87k2wnqvga.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Tue, 05 May 2015 16:28:53 +0800")
Message-ID: <87h9rr5hje.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:

> How about using a shell variable as input for the location:
> (replace /gnu/store/xxx with $GUIX_PROFILE)
>
>   # etc/profile
>   export PATH=3D$GUIX_PROFILE/bin:$PATH
>   export MANPATH=3D$GUIX_PROFILE/share/man:$MANPATH
>   ...
>
> Then when 'source' it, we pass the location:
> (we did know where $GUIX_PROFILE is when do the 'source')
>
>   # ~/.bash_profile
>   GUIX_PROFILE=3D$HOME/.guix-profile
>   if [ -f $GUIX_PROFILE/etc/profile ]; then
>     . $GUIX_PROFILE/etc/profile
>   fi
>
>   # /etc/profile
>   GUIX_PROFILE=3D/run/current-system/profile
>   source $GUIX_PROFILE/etc/profile

Yes, but we would also like users to be able to source
~/.guix-profile/etc/profile themselves directly, and it wouldn=E2=80=99t be=
 nice
to ask them to set GUIX_PROFILE before sourcing it.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 5 May 2015 08:29:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 05 04:29:35 2015
Received: from localhost ([127.0.0.1]:34317 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YpYEQ-0000Nz-Og
	for submit <at> debbugs.gnu.org; Tue, 05 May 2015 04:29:35 -0400
Received: from mail-pd0-f172.google.com ([209.85.192.172]:35065)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <iyzsong@HIDDEN>) id 1YpYEO-0000NY-1o
 for 20255 <at> debbugs.gnu.org; Tue, 05 May 2015 04:29:32 -0400
Received: by pdbqd1 with SMTP id qd1so188548439pdb.2
 for <20255 <at> debbugs.gnu.org>; Tue, 05 May 2015 01:29:26 -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=CXk5Yon3X81WaTapx49qsnO6/M6KUgOgNgLhHN7xBB0=;
 b=Qkaqrire4BywxA0EotpgJj6ofeWiX76qLB/kQH75ajaf8sjzXVM54j/XPWUy7MWwAG
 S0Cl4tXdikFNoGsZUzq0Tl2+WeZjft0kQn+KIuBvJCVQR73k1N/LZSTFiX+NhqoDNPx5
 7uTPhsu72NmKGKxlDG/QClU4oeN8Kr3WJrLIGMQ3rlYz0ye2UU5V5p894UJ96isY3ZKk
 x/pnvTP6sYlyrLDcy9LdF5w/UXIMEuIEkk6wQ4ThmmWpl+sAY7ifMBmv1t1DOMbHjwNr
 dTZIkSmcFqWKI2sFeCojZQ1fuaL+ZRZjjUoaZabyuvlszVJinIHj0tjU3ZlDIIOkeYH7
 X5pQ==
X-Received: by 10.70.101.2 with SMTP id fc2mr49871808pdb.77.1430814497324;
 Tue, 05 May 2015 01:28:17 -0700 (PDT)
Received: from localhost ([108.61.250.36])
 by mx.google.com with ESMTPSA id jg3sm15023511pbb.72.2015.05.05.01.28.15
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 05 May 2015 01:28:16 -0700 (PDT)
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
In-Reply-To: <87lhh43tn0.fsf@HIDDEN>
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <87lhh43tn0.fsf@HIDDEN>
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.5.1
 (x86_64-unknown-linux-gnu)
Date: Tue, 05 May 2015 16:28:53 +0800
Message-ID: <87k2wnqvga.fsf@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:
>
>> 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/pr=
ofile/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
>>     [...]
>
> There=E2=80=99s a further complication here: =E2=80=98profile-derivation=
=E2=80=99, which builds
> the profile, doesn=E2=80=99t know its user-visible name ~/.guix-profile. =
 It
> just knows its store file name.  However, we don=E2=80=99t want etc/profi=
le to
> read:
>
>   export PATH=3D/gnu/store/...-profile/bin:$PATH
>
> because then, the user=E2=80=99s environment variables in a running sessi=
on
> would keep pointing to a given profile generation.
Indeed.  Run guix to install a package should make it available
immediately.  Currently, we have 'PATH=3D~/.guix-profile/bin' in
profile and print hint for additional variables.
(Note that when profile changes, even we build all variables with the
location they going to be, a hint or re-source is still needed when the
new profile bring new variables.)
>
> So we have to tell =E2=80=98profile-generation=E2=80=99 what the user-vis=
ible name of
> the profile is going to be.  Attached is a very rough patch to do that.
> This is not so nice because all user interfaces will now have to pass
> that #:target parameter or etc/profile will be =E2=80=9Cwrong.=E2=80=9D
>
> Another option would be to simply run:
>
>   eval `guix package -p ~/.guix-profile --search-paths`
>
> This has two downsides:
>
>   1. It takes ~200 ms to run on my laptop, which can maybe be
>      noticeable; OTOH it=E2=80=99s only for interactive shells, so maybe =
that=E2=80=99s
>      OK.
>
>   2. If there=E2=80=99s a manifest format change and /etc/profile calls a=
 =E2=80=98guix=E2=80=99
>      command that cannot handle the manifest format (because it=E2=80=99s=
 older
>      than the =E2=80=98guix=E2=80=99 used to build the profile), then it =
doesn=E2=80=99t work at
>      all (that=E2=80=99s a bit contrived, but not completely impossible.)
>
> Thoughts?
>
How about using a shell variable as input for the location:
(replace /gnu/store/xxx with $GUIX_PROFILE)

  # etc/profile
  export PATH=3D$GUIX_PROFILE/bin:$PATH
  export MANPATH=3D$GUIX_PROFILE/share/man:$MANPATH
  ...

Then when 'source' it, we pass the location:
(we did know where $GUIX_PROFILE is when do the 'source')

  # ~/.bash_profile
  GUIX_PROFILE=3D$HOME/.guix-profile
  if [ -f $GUIX_PROFILE/etc/profile ]; then
    . $GUIX_PROFILE/etc/profile
  fi

  # /etc/profile
  GUIX_PROFILE=3D/run/current-system/profile
  source $GUIX_PROFILE/etc/profile




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 4 May 2015 21:44:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 04 17:44:25 2015
Received: from localhost ([127.0.0.1]:34076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YpOA4-0007Pi-Uj
	for submit <at> debbugs.gnu.org; Mon, 04 May 2015 17:44:25 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:59998 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1YpOA2-0007PY-Q7
 for 20255 <at> debbugs.gnu.org; Mon, 04 May 2015 17:44:23 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:41243 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1YpOA1-0005ok-EX; Mon, 04 May 2015 17:44:22 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN>
Date: Mon, 04 May 2015 23:44:19 +0200
In-Reply-To: <87d23j1bxk.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Sun, 05 Apr 2015 11:39:03 +0800")
Message-ID: <87lhh43tn0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:

> 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
>     [...]

There=E2=80=99s a further complication here: =E2=80=98profile-derivation=E2=
=80=99, which builds
the profile, doesn=E2=80=99t know its user-visible name ~/.guix-profile.  It
just knows its store file name.  However, we don=E2=80=99t want etc/profile=
 to
read:

  export PATH=3D/gnu/store/...-profile/bin:$PATH

because then, the user=E2=80=99s environment variables in a running session
would keep pointing to a given profile generation.

So we have to tell =E2=80=98profile-generation=E2=80=99 what the user-visib=
le name of
the profile is going to be.  Attached is a very rough patch to do that.
This is not so nice because all user interfaces will now have to pass
that #:target parameter or etc/profile will be =E2=80=9Cwrong.=E2=80=9D

Another option would be to simply run:

  eval `guix package -p ~/.guix-profile --search-paths`

This has two downsides:

  1. It takes ~200 ms to run on my laptop, which can maybe be
     noticeable; OTOH it=E2=80=99s only for interactive shells, so maybe th=
at=E2=80=99s
     OK.

  2. If there=E2=80=99s a manifest format change and /etc/profile calls a =
=E2=80=98guix=E2=80=99
     command that cannot handle the manifest format (because it=E2=80=99s o=
lder
     than the =E2=80=98guix=E2=80=99 used to build the profile), then it do=
esn=E2=80=99t work at
     all (that=E2=80=99s a bit contrived, but not completely impossible.)

Thoughts?

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

	Modified   guix/profiles.scm
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 8445e00..308dc23 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -582,10 +582,15 @@ MANIFEST.  Single-file bundles are required by programs such as Git and Lynx."
 
 (define* (profile-derivation manifest
                              #:key
+                             target
                              (hooks %default-profile-hooks))
   "Return a derivation that builds a profile (aka. 'user environment') with
 the given MANIFEST.  The profile includes additional derivations returned by
-the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc."
+the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc.
+
+When TARGET is not #f, it must be a string denoting the file name under which
+the profile will be available--e.g., \"/home/rms/.guix-profile\".  This name
+is used in the profile's 'etc/profile' file (read that again.)"
   (mlet %store-monad ((extras (if (null? (manifest-entries manifest))
                                   (return '())
                                   (sequence %store-monad
@@ -598,20 +603,72 @@ the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc."
 
     (define builder
       #~(begin
-          (use-modules (ice-9 pretty-print)
-                       (guix build union))
+          (use-modules (ice-9 match)
+                       (ice-9 regex)
+                       (ice-9 pretty-print)
+                       (guix build union)
+                       (guix build utils)
+                       (guix search-paths))
+
+          (define target
+            '#$target)
+
+          (define search-paths
+            (map sexp->search-path-specification
+                 '#$(map search-path-specification->sexp
+                         (append-map manifest-entry-search-paths
+                                     (manifest-entries manifest)))))
+
+          (define (use-target value separator)
+            (let ((items ((@@ (guix search-paths) string-tokenize*)
+                          value separator)))
+              (string-join (map (lambda (str)
+                                  (string-append target
+                                                 (string-drop str
+                                                              (string-length
+                                                               #$output))))
+                                items)
+                           separator)))
+
+          (define write-environment-variable-definition
+            (match-lambda
+              ((spec . value)
+               (let ((variable (search-path-specification-variable spec))
+                     (sep      (search-path-specification-separator spec)))
+                 (display
+                  (environment-variable-definition variable
+                                                   (if target
+                                                       (use-target value sep)
+                                                       value)
+                                                   #:separator sep
+                                                   #:kind 'prefix))
+                 (newline)))))
 
           (setvbuf (current-output-port) _IOLBF)
           (setvbuf (current-error-port) _IOLBF)
 
+          ;; Make the symlinks.
           (union-build #$output '#$inputs
                        #:log-port (%make-void-port "w"))
+
+          ;; Store meta-data.
           (call-with-output-file (string-append #$output "/manifest")
             (lambda (p)
-              (pretty-print '#$(manifest->gexp manifest) p)))))
+              (pretty-print '#$(manifest->gexp manifest) p)))
+
+          ;; Store a ready-to-use Bash profile.
+          (mkdir-p (string-append #$output "/etc"))
+          (with-output-to-file (string-append #$output "/etc/profile")
+            (lambda ()
+              (let ((variables (evaluate-search-paths search-paths #$output)))
+                (for-each write-environment-variable-definition
+                          variables))))))
 
     (gexp->derivation "profile" builder
-                      #:modules '((guix build union))
+                      #:modules '((guix build union)
+                                  (guix build utils)
+                                  (guix search-paths)
+                                  (guix records))
                       #:local-build? #t)))
 
 (define (profile-regexp profile)
	Modified   guix/scripts/package.scm
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 7f53af7..38ec8ed 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -833,6 +833,7 @@ more information.~%"))
                (let* ((prof-drv (run-with-store (%store)
                                   (profile-derivation
                                    new
+                                   #:target (user-friendly-profile profile)
                                    #:hooks (if bootstrap?
                                                '()
                                                %default-profile-hooks))))


--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 2 May 2015 22:12:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 02 18:12:17 2015
Received: from localhost ([127.0.0.1]:60027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yofdw-0000E4-CI
	for submit <at> debbugs.gnu.org; Sat, 02 May 2015 18:12:16 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:48793 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1Yofdu-0000Dw-Lo
 for 20255 <at> debbugs.gnu.org; Sat, 02 May 2015 18:12:15 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:40890 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1Yofdt-0006Us-OF; Sat, 02 May 2015 18:12:14 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN>
Date: Sun, 03 May 2015 00:12:11 +0200
In-Reply-To: <876199q4z1.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Mon, 06 Apr 2015 12:02:26 +0800")
Message-ID: <87ioca4ojo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:

>> [...]
>>>
>>> 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 by 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?
> I see, currently search-paths depends on the packages recipes. If we
> update the related scheme code, then search-paths got updated, even we
> didn't touch packages in profile at all.  It's a little confusing.
> So I think we should encode the search-paths for each package in
> manifest.

Done in dedb17a.

That will make it easier to generate environment variable settings.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 6 Apr 2015 08:24:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 06 04:24:30 2015
Received: from localhost ([127.0.0.1]:45854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yf2Kb-0005dn-Gu
	for submit <at> debbugs.gnu.org; Mon, 06 Apr 2015 04:24:29 -0400
Received: from world.peace.net ([50.252.239.5]:56304 ident=hope7)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mhw@HIDDEN>) id 1Yf2KZ-0005df-17
 for 20255 <at> debbugs.gnu.org; Mon, 06 Apr 2015 04:24:27 -0400
Received: from [10.1.10.78] (helo=jojen)
 by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <mhw@HIDDEN>)
 id 1Yf2KS-00089T-KL; Mon, 06 Apr 2015 04:24:20 -0400
From: Mark H Weaver <mhw@HIDDEN>
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
 <876199q4z1.fsf@HIDDEN>
Date: Mon, 06 Apr 2015 04:24:54 -0400
In-Reply-To: <876199q4z1.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Mon, 06 Apr 2015 12:02:26 +0800")
Message-ID: <87lhi5zmsp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 20255
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> writes:

>> [...]
>>>
>>> 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 by 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?
> I see, currently search-paths depends on the packages recipes. If we
> update the related scheme code, then search-paths got updated, even we
> didn't touch packages in profile at all.  It's a little confusing.
> So I think we should encode the search-paths for each package in
> manifest.

I agree.

     Mark




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 6 Apr 2015 04:02:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 06 00:02:05 2015
Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YeyEf-0005Ge-0s
	for submit <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:02:05 -0400
Received: from mail-pa0-f47.google.com ([209.85.220.47]:34881)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <iyzsong@HIDDEN>) id 1YeyEc-0005GA-MF
 for 20255 <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:02:03 -0400
Received: by patj18 with SMTP id j18so32189983pat.2
 for <20255 <at> debbugs.gnu.org>; Sun, 05 Apr 2015 21:01:56 -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=Zy2TYFZ/KHnOCUl2rPr9n3CwkMfVjtRY5xEBNRRzQBA=;
 b=AGW7BX/Zw1IsJHW57eTNpmhCSE/vPfK0tJtlJ78Lg0Y2LXAnlPPnQdsubJ2HOUc/bI
 fWDxOmf4cRbNXLSotAhnGDbWo+Ob0gUSFsJi+8dPGslgzhzHuWMOsrri0N38M2K5S3wj
 u4Tu1Fz8PPZY2aSx88Zy7paZPR5WK0GJqhVWLcrsGNEzXDVyu4/oILVx5TvY8GVutIIN
 ejKVvOBWY0Vptm+uFIkLkdhOIzZRTyF81hTVwR2rfR76XBRwt7oGdzIAd9rzxLDFgkad
 a5UrYIO+Gp76dV6zikjyH9CuGAyWmlQgVSolVAX/O3dmi9qZNdDAx+/6Rrn2/VJBm2iD
 +cUg==
X-Received: by 10.66.90.168 with SMTP id bx8mr24109755pab.53.1428292916804;
 Sun, 05 Apr 2015 21:01:56 -0700 (PDT)
Received: from localhost ([108.61.250.36])
 by mx.google.com with ESMTPSA id r8sm2942887pdp.10.2015.04.05.21.01.55
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 05 Apr 2015 21:01:56 -0700 (PDT)
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
In-Reply-To: <871tjyfnl8.fsf@HIDDEN>
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN> <871tjyfnl8.fsf@HIDDEN>
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1
 (x86_64-unknown-linux-gnu)
Date: Mon, 06 Apr 2015 12:02:26 +0800
Message-ID: <876199q4z1.fsf@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> [...]
>>
>> 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=
 by 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?
I see, currently search-paths depends on the packages recipes. If we
update the related scheme code, then search-paths got updated, even we
didn't touch packages in profile at all.  It's a little confusing.
So I think we should encode the search-paths for each package in
manifest.
> Thanks,
> Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 5 Apr 2015 18:15:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 05 14:15:53 2015
Received: from localhost ([127.0.0.1]:45670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yep5N-0006zh-65
	for submit <at> debbugs.gnu.org; Sun, 05 Apr 2015 14:15:53 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:54647 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1Yep5L-0006x5-91
 for 20255 <at> debbugs.gnu.org; Sun, 05 Apr 2015 14:15:51 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:48086 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1Yep5K-0002jG-AD; Sun, 05 Apr 2015 14:15:50 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
 <87d23j1bxk.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 16 Germinal an 223 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sun, 05 Apr 2015 20:15:47 +0200
In-Reply-To: <87d23j1bxk.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Sun, 05 Apr 2015 11:39:03 +0800")
Message-ID: <871tjyfnl8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> 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.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 5 Apr 2015 03:38:43 +0000
From debbugs-submit-bounces <at> 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 <at> debbugs.gnu.org>)
	id 1YebOV-0006MP-1p
	for submit <at> 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@HIDDEN>) id 1YebOS-0006MC-B3
 for 20255 <at> debbugs.gnu.org; Sat, 04 Apr 2015 23:38:41 -0400
Received: by patj18 with SMTP id j18so6916680pat.2
 for <20255 <at> 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: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
In-Reply-To: <87fv8fip01.fsf@HIDDEN>
References: <877ftschjt.fsf@HIDDEN> <87fv8fip01.fsf@HIDDEN>
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@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> 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
>>=20=20=20
>> 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=E2=80=99m not sure how this could be improved.  We could har=
d-code
> lookup in /run/current-system/profile/.  OTOH that=E2=80=99s not differen=
t from
> installing perl in one profile, and perl-xml-parser in another
> (arbitrary) profile, which =E2=80=98guix package=E2=80=99 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=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/profi=
le/sbin:$PATH
    export MANPATH=3D/run/current-system/profile/share/man:$PATH
    [...]
=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.




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at 20255 <at> debbugs.gnu.org:


Received: (at 20255) by debbugs.gnu.org; 4 Apr 2015 21:04:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 04 17:04:52 2015
Received: from localhost ([127.0.0.1]:44937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YeVFM-0002GI-0T
	for submit <at> debbugs.gnu.org; Sat, 04 Apr 2015 17:04:52 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:39360 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1YeVFJ-0002G8-IL
 for 20255 <at> debbugs.gnu.org; Sat, 04 Apr 2015 17:04:50 -0400
Received: from reverse-83.fdn.fr ([80.67.176.83]:46701 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1YeVFI-0001hO-Ei; Sat, 04 Apr 2015 17:04:48 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#20255: 'search-paths' should respect both user and system
 profile.
References: <877ftschjt.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 15 Germinal an 223 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 04 Apr 2015 23:04:46 +0200
In-Reply-To: <877ftschjt.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Sat, 04 Apr 2015 18:29:58 +0800")
Message-ID: <87fv8fip01.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 20255
Cc: 20255 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> 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
>=20=20=20
> 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=E2=80=99m not sure how this could be improved.  We could hard-=
code
lookup in /run/current-system/profile/.  OTOH that=E2=80=99s not different =
from
installing perl in one profile, and perl-xml-parser in another
(arbitrary) profile, which =E2=80=98guix package=E2=80=99 cannot be aware o=
f.

WDYT?

> Another interesting fact is that we have both guile and guix in
> system profile, but the guix modules isn't work out-of-the-box
> on GuixSD.

(But guix.el *does* work out of the box.)

For a start, what about augmenting /etc/profile:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/gnu/system.scm b/gnu/system.scm
index 0d510b6..bcc4919 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -447,6 +447,8 @@ export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin
 export PATH=/run/setuid-programs:/run/current-system/profile/sbin:$PATH
 export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man
 export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
+export GUILE_LOAD_PATH=$HOME/share/guile/site/2.0:/run/current-system/profile/share/guile/site/2.0
+export GUILE_LOAD_COMPILED_PATH=$HOME/share/guile/site/2.0:/run/current-system/profile/share/guile/site/2.0
 
 export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share
 export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

DQpUaGFua3MsDQpMdWRv4oCZLg0K
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Apr 2015 10:29:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 04 06:29:43 2015
Received: from localhost ([127.0.0.1]:44344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YeLKg-0006mw-Er
	for submit <at> debbugs.gnu.org; Sat, 04 Apr 2015 06:29:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49766)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKe-0006mh-AR
 for submit <at> debbugs.gnu.org; Sat, 04 Apr 2015 06:29:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKY-00033u-IP
 for submit <at> debbugs.gnu.org; Sat, 04 Apr 2015 06:29:35 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60041)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKY-00033q-FS
 for submit <at> debbugs.gnu.org; Sat, 04 Apr 2015 06:29:34 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51484)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKX-0006mP-H2
 for bug-guix@HIDDEN; Sat, 04 Apr 2015 06:29:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKU-000338-C3
 for bug-guix@HIDDEN; Sat, 04 Apr 2015 06:29:33 -0400
Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]:34585)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1YeLKU-000331-5F
 for bug-guix@HIDDEN; Sat, 04 Apr 2015 06:29:30 -0400
Received: by pdbni2 with SMTP id ni2so148159933pdb.1
 for <bug-guix@HIDDEN>; Sat, 04 Apr 2015 03:29:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:user-agent:date:message-id:mime-version
 :content-type; bh=MxvZliEufHR77gjiVphQ1jGyf09M2hnrpvuZzqLE4ZI=;
 b=cKVCnE5jNcDoshbAF4Qpq7Fo24xuTQIJSUgpEIyKIXwFk6UH55O7oBvUIRfz1MGEcx
 GWU8gtss2xGGSGsU7xSRZWXx/aqQ1Bpu40sc9/tQvzxmyaHqep4TGQvihZS8Gsa7G1Ub
 owflqYQFgr8/xW+tV9K0UcM6xfMDG9kN8zmNuAnhA6yt8ztTwP6eUYxy4x6KUYxE4Fsu
 IKDsQRiZtTIpuZA273lye1lKwqQiIeOriH6jFOt/XxcJ/UaPuIRmyFW3iDEswJ+3Afhu
 KpL/3Hjt5XwzlM9Npk434YejUM39e8DNQKx6Sur1Spz6xnXi8PpMc2OprVQkeDDwo/u+
 E5ig==
X-Received: by 10.66.55.74 with SMTP id q10mr11172872pap.94.1428143369058;
 Sat, 04 Apr 2015 03:29:29 -0700 (PDT)
Received: from localhost ([108.61.250.36])
 by mx.google.com with ESMTPSA id oq7sm10663684pac.32.2015.04.04.03.29.27
 for <bug-guix@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 04 Apr 2015 03:29:28 -0700 (PDT)
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: bug-guix@HIDDEN
Subject: 'search-paths' should respect both user and system profile.
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1
 (x86_64-unknown-linux-gnu)
Date: Sat, 04 Apr 2015 18:29:58 +0800
Message-ID: <877ftschjt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

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.
Another interesting fact is that we have both guile and guix in
system profile, but the guix modules isn't work out-of-the-box
on GuixSD.




Acknowledgement sent to 宋文武 <iyzsong@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#20255; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 19 Dec 2015 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.