ludo@gnu.org (Ludovic Courtès) skribis: > 宋文武 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 “guessed” 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’s 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’s OK, at least on my i5+SSD laptop. --8<---------------cut here---------------start------------->8--- $ time guix package -p ~/.guix-profile -p /run/current-system/profile --search-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’ll push it soon if there are no objections. TIA! Ludo’.