unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* support for non-list search paths
@ 2017-03-06 16:08 Troy Sankey
  2017-03-06 21:22 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Troy Sankey @ 2017-03-06 16:08 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

The file "~/.guix-profile/etc/profile" treats all search paths as
colon-separated lists.  Some variables are not supposed to be lists, but
treating them as such could confuse programs which read them.
GIT_EXEC_PATH is one that has caused me trouble, so I'll be using it as
an example below.

The relevant line from "~/.guix-profile/etc/profile":

% grep GIT_EXEC_PATH ~/.guix-profile/etc/profile
export GIT_EXEC_PATH="${GUIX_PROFILE:-/gnu/store/9wwv7rl8n6ydcpa0h22nd38amwssfrbh-profile}/libexec/git-core${GIT_EXEC_PATH:+:}$GIT_EXEC_PATH"

Here's what my GIT_EXEC_PATH looks like from a terminal emulator:

% echo $GIT_EXEC_PATH
/home/sankey/.guix-profile/libexec/git-core:/home/sankey/.guix-profile/libexec/git-core

Here's the error from git:

% git rebase
/home/sankey/.guix-profile/libexec/git-core/git-sh-setup: line 46: /home/sankey/.guix-profile/libexec/git-core:/home/sankey/.guix-profile/libexec/git-core/git-sh-i18n: No such file or directory

Since my shell rcfile is sourced twice, GIT_EXEC_PATH becomes a
colon-separated list.  Double-sourcing the shell rcfile may not be the
only way to surface this issue.  If my rcfile simply set GIT_EXEC_PATH
before sourcing "~/.guix-profile/etc/profile", then I would still end up
with a corrupt GIT_EXEC_PATH.

My workaround involves using `guix package --search-paths=exact`, but
this cost me some time debugging which I'd like to save the next person.
I am not sure what the solution should be.  Maybe just a clarification
in documentation?  What about an argument for search-path-specification
to force the variable to always be "exact"?

Troy

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE0zLJ6STd4Cp+CgbIgs677ofYV8IFAli9iW8ACgkQgs677ofY
V8K9fxAAqFIJMp5/NYbPpg34jnknFzqEiPyJDILV0blNn9h+Fy3JEBHYh29kQCCo
Wgw/gAclSFt8ZOCvM7lqATwYF5vsEPfnXDHBij8eVwIPalx2Y6+crtRALMlt1aAa
HAvMJ0JixkLAVap+LeGj1I5Me/Kxgcco1B7/tnviSqrQqnpr6DWoKfkT/XIPtQU0
dquFF5CMKlMzBSyGTYpN4RvMF/OVEJ09nVLJdg3GwYmDN7Hrknf4yupM/c6Dp18I
KrAiW7ofMNXQMDR80lCuJPdd1F36d6HhkRtxSfEaxFNJxrjafldT5o4L+Xfg9xx6
G5MBFqX1N8Kj5YoDptszT1lE69t2lhll4+eKUogLbXsMrBkcaDV1LTk2Hif83QwD
hOT4yr0qoLSVyidUA9PNPrJi/gJqVwiHE9dW/7WnAblI9xNNdItfu1fOdv5KURGM
gbjDj5Ew2yZ32j/7cDLBedKTuh0Nf2PcFd703HIl8V2isZEuAEh7yewd2u6xxf1a
1bD/dMcdG6b8R6SUHQNCzP3gjC1VsJQKh/N/iBkDOUddPJya044UhmGUEDrX6k5l
Y3Bi603N9Tr6cjw/eYqKAVA7s3o4gegiVg7t1CqXDM+7hBJZd8hxkQ05v4bIm2Dh
j5yudWtRzwbUZbjhP0wb+iUkSc36bXkQx3hkoKT/h0TP+44NYfM=
=h4xm
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: support for non-list search paths
  2017-03-06 16:08 support for non-list search paths Troy Sankey
@ 2017-03-06 21:22 ` Ludovic Courtès
  2017-03-07  0:43   ` Troy Sankey
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-03-06 21:22 UTC (permalink / raw)
  To: Troy Sankey; +Cc: guix-devel

Hi,

Troy Sankey <sankeytms@gmail.com> skribis:

> My workaround involves using `guix package --search-paths=exact`, but
> this cost me some time debugging which I'd like to save the next person.
> I am not sure what the solution should be.  Maybe just a clarification
> in documentation?  What about an argument for search-path-specification
> to force the variable to always be "exact"?

This last option has been implemented in the ‘core-updates’ branch,
which is meant to be merged Real Soon (hopefully within one or two
weeks):

  https://bugs.gnu.org/25422

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: support for non-list search paths
  2017-03-06 21:22 ` Ludovic Courtès
@ 2017-03-07  0:43   ` Troy Sankey
  2017-03-08  8:46     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Troy Sankey @ 2017-03-07  0:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 681 bytes --]

Quoting Ludovic Courtès (2017-03-06 16:22:52)
> Hi,
> 
> Troy Sankey <sankeytms@gmail.com> skribis:
> 
> > My workaround involves using `guix package --search-paths=exact`, but
> > this cost me some time debugging which I'd like to save the next person.
> > I am not sure what the solution should be.  Maybe just a clarification
> > in documentation?  What about an argument for search-path-specification
> > to force the variable to always be "exact"?
> 
> This last option has been implemented in the ‘core-updates’ branch,
> which is meant to be merged Real Soon (hopefully within one or two
> weeks):
> 
>   https://bugs.gnu.org/25422

Wow! yay!

Troy

[-- Attachment #1.2: 0001-gnu-git-force-GIT_EXEC_PATH-to-be-single-entry.patch --]
[-- Type: text/x-diff, Size: 976 bytes --]

From faf99fec917115cdce11b48e5bb68159322c9eef Mon Sep 17 00:00:00 2001
From: Troy Sankey <sankeytms@gmail.com>
Date: Mon, 6 Mar 2017 19:31:02 -0500
Subject: [PATCH] gnu: git: force GIT_EXEC_PATH to be single-entry

* gnu/packages/version-control.scm (git)[native-search-paths](separator):
New field.
---
 gnu/packages/version-control.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9cbd49220..d2ddfeef0 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -295,6 +295,7 @@ as well as the classic centralized workflow.")
            (files '("etc/ssl/certs/ca-certificates.crt")))
           (search-path-specification
            (variable "GIT_EXEC_PATH")
+           (separator #f)                         ;single entry
            (files '("libexec/git-core")))))
 
    (synopsis "Distributed version control system")
-- 
2.12.0


[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE0zLJ6STd4Cp+CgbIgs677ofYV8IFAli+AhoACgkQgs677ofY
V8LUFg/+LEJqY0cDjuRNRKrZKHo6LvktRL5Vns9dD6Ah37XOEvSTlCogyZ3N6LRA
SsH+hoWyfCsSOr6XoYc4MfpmSx2qBGp5LAKDzX8PGsBYh4jCTOw6ZRYrlMB8h2D/
EifBQDYcQgv4GfDr4r5XyCwn/uT7il2M47wPYwAXsx5iEbIEVEqvRgtJNKiNf05P
trRmGEmbXkoO/lqdW3gHGm+BoqyFMor6pXK0QMUJvQcqbBfl2ehpUKSz9qjAYa09
bLRD4VavfLdTYKb6gCJ2w/nb4ROlgkuevXQCDxXRTdpTA2DpcOgwB2pyUkDpYvgD
/m5YHxt9O7/xTX6q05AcKEAbBmgDb+P9VtBO66NcRA9zJpcs9Fla2ZmKQqPQWS0q
9EBi9wbe76BKhxvp/Oq+QtxEJajyy3hXzdWn6Ybv83EUQiVWB4Kox9F858Uwfi91
D5q510txQwRKIDMBMrfsHeiX1zff7/hY7kXYGx4BgdyMyBosBMmKmaXaxJFrRym6
U4OGKZXqluxe9uq4vwIJ+H+apaBY0LxG5Vk6K0YYNjeZKKSvUoNG2E3+ebOnQf/Q
t25WCiIHkDICm3k3Lo7CGmWsq/cRJ9TSvoc8W1FyUiie9lad7ju1Ay2iNHwwbD2h
d/zAo9A54bRGQSvqXQMjknjD5XMsX0G6IH9hxK5ViLIiPgxyjuk=
=xZpi
-----END PGP SIGNATURE-----

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: support for non-list search paths
  2017-03-07  0:43   ` Troy Sankey
@ 2017-03-08  8:46     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-03-08  8:46 UTC (permalink / raw)
  To: Troy Sankey; +Cc: guix-devel

Troy Sankey <sankeytms@gmail.com> skribis:

> From faf99fec917115cdce11b48e5bb68159322c9eef Mon Sep 17 00:00:00 2001
> From: Troy Sankey <sankeytms@gmail.com>
> Date: Mon, 6 Mar 2017 19:31:02 -0500
> Subject: [PATCH] gnu: git: force GIT_EXEC_PATH to be single-entry
>
> * gnu/packages/version-control.scm (git)[native-search-paths](separator):
> New field.

Applied to ‘core-updates’, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-08  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 16:08 support for non-list search paths Troy Sankey
2017-03-06 21:22 ` Ludovic Courtès
2017-03-07  0:43   ` Troy Sankey
2017-03-08  8:46     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).