Subject: bug#22629: [PATCH v2 2/3] Add (guix describe) and use it to initialize '%package-search-path'.

From: Ricardo Wurmus <[email-masked]>
Date: Fri, 31 Aug 2018 16:32:43 +0200

Ludovic Courtès <[email-masked]> writes:

> Regarding %package-module-path itself, whether channels come first or
> not doesn’t actually make much of a difference at this point since
> ‘fold-packages’ traverses everything anyway.  Maybe in the future
> ‘fold-packages’ could make some distinction though.  Dunno.

Ah, I see.  Thanks for clarifying.

>> I don’t know… there’s something about this file system traversal that
>> doesn’t sit right with me.  I’m not sure about (command-line) — when
>> …/bin/guix is executed by a wrapper, will the wrapper be the “program”
>> that we match against or the target?  (This is a concern for wrappers
>> that set up site-wide default channels or a remote daemon, for example.)
>
> The ‘guix’ command is a script starting with:
>
>   #!/gnu/store/…-guile-2.2.4/bin/guile --no-auto-compile
>
> ‘guile’ receives the ‘guix’ file name as its argv[1].  Since the ‘guix’
> file name was passed as the first argument to ‘execve’, it is
> necessarily valid (either it’s relative to $PWD or, in the likely case
> where ‘guix’ was searched for in $PATH, it’s an absolute file name.)
>
> In addition (ice-9 command-line) arranges to make the first non-hyphen
> argument the first element of what ‘command-line’ returns.
>
> If you have a wrapper that execs ‘guix’ or whatever, it’ll still work.

That’s good.

> Of course, the trick doesn’t work if you do things like:
>
>   guile -L ~/.config/guix/current/share/guile/site/2.2
>
> but I think that’s OK.

Yeah, I wouldn’t worry about that.

Thanks!

-- 
Ricardo