Subject: bug#42920: conda 4.8.3 on guix cannot activate environments

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 25 Aug 2020 14:34:11 +0200

Hi Hugo,

> The problem with the prompt arises from step 4), because 'conda' has bash
> as interpreter, and "non-interactive bashes go out of their way to unset
> PS1":
> https://superuser.com/questions/663069/why-does-subshell-not-inherit-exported-variable-ps1
> https://tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html

Good sleuthing!

> So .conda.real never gets the PS1 variable and it disappears.
>
> I don't really understand why there is a bash function, a conda bash script
> and a .conda-real python script.

That’s because we wrap application to ensure that they run with expected
environment variables.  By default this wrapper is implemented as a Bash
script, but we also have “wrap-script”, which turns scripts using “#” as
a comment character into polyglottal Guile scripts, setting variables
with Guile and then reexecuting themselves with the actual interpreter.

Not sure if that would help here.

(There also have been reports about “wrap-script” being buggy, but I
don’t recall any details.)

-- 
Ricardo