guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recent change in 'guix package --search-paths' behavior?


From: Chris Marusich
Subject: Re: Recent change in 'guix package --search-paths' behavior?
Date: Thu, 11 May 2017 00:07:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Ludo,

address@hidden (Ludovic Courtès) writes:

> Chris Marusich <address@hidden> skribis:
>
>> Hi,
>>
>> The manual says ((guix) Invoking guix package):
>>
>>      This option can also be used to compute the _combined_ search paths
>>      of several profiles.  Consider this example:
>>
>>           $ guix package -p foo -i guile
>>           $ guix package -p bar -i guile-json
>>           $ guix package -p foo -p bar --search-paths
>>
>>      The last command above reports about the ‘GUILE_LOAD_PATH’
>>      variable, even though, taken individually, neither ‘foo’ nor ‘bar’
>>      would lead to that recommendation.
>
> [...]
>
>> Is the documentation wrong, or is this a regression?
>
> Try with “guile2.2-json” instead of “guile-json”.
>
> Ludo’.

As usual, you're right!  :-)  That worked:

--8<---------------cut here---------------start------------->8---
[0] address@hidden:/tmp
$ guix package -p foo -i guile
The following package will be installed:
   guile        2.2.2   /gnu/store/5zx29y44nrqj0s8h3jlvlj82k8hj4dxs-guile-2.2.2

1 package in profile
The following environment variable definitions may be needed:
   export PATH="foo/bin${PATH:+:}$PATH"
[0] address@hidden:/tmp
$ guix package -p bar -i guile2.2-json
The following package will be installed:
   guile2.2-json        0.6.0   
/gnu/store/a7hrfb8p7syai31rxhrcrmlq81kjcs5v-guile2.2-json-0.6.0

1 package in profile
[0] address@hidden:/tmp
$ guix package -p foo -p bar --search-paths
export PATH="foo/bin"
export GUILE_LOAD_PATH="bar/share/guile/site/2.2"
export GUILE_LOAD_COMPILED_PATH="bar/share/guile/site/2.2"
[0] address@hidden:/tmp
$ 
--8<---------------cut here---------------end--------------->8---

Why does 'guix' resolve to address@hidden, but 'guile-json' resolves to
address@hidden  Is it because, as mentioned in the comments in
procedure 'find-newest-available-packages' in gnu/packages.scm, "the
preferred package is whichever one was found last by 'fold-packages'"?

I've attached a patch for the documentation which might help clarify
this for anyone who has the same question in the future.  What do you
think?  Too much detail for an edge case, or a useful footnote?

-- 
Chris

Attachment: 0001-doc-Clarify-guix-package-search-paths-example.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]