unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59776: Conda hardcodes guix hash in .bashrc
@ 2022-12-02 13:09 Hugo Buddelmeijer
  0 siblings, 0 replies; only message in thread
From: Hugo Buddelmeijer @ 2022-12-02 13:09 UTC (permalink / raw)
  To: 59776

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

Hi all,

Conda adds some bash functions to ~/.bashrc, but those contain a hardcoded
guix hash. That means that conda will break between upgrades:

hugo@alex ~/t$ guix shell -C conda
hugo@alex ~/t [env]$ conda init bash
# ignore errors
hugo@alex ~/t [env]$ echo "$(<~/.bashrc)" # no coreutils

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/gnu/store/kihiw0r9r595jwhxlydkl0f5vvn53r1z-conda-22.9.0/bin/conda'
'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f
"/gnu/store/kihiw0r9r595jwhxlydkl0f5vvn53r1z-conda-22.9.0/etc/profile.d/conda.sh"
]; then
        .
"/gnu/store/kihiw0r9r595jwhxlydkl0f5vvn53r1z-conda-22.9.0/etc/profile.d/conda.sh"
    else
        export
PATH="/gnu/store/kihiw0r9r595jwhxlydkl0f5vvn53r1z-conda-22.9.0/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<


It seems that the contents of ~/.bashrc are based on the file
conda/core/initialize.py:
https://github.com/conda/conda/blob/main/conda/core/initialize.py

It refers to a conda_prefix (and conda_exe) variable. These should somehow
refer to the guix profile, not to the packages in the store.

I'm not yet experienced enough to propose how to tackle this. It seems hard
to do this in a generic way, because guix and conda kinda collide here.
E.g. different guix profiles (with different conda packages) could share
the same home directory.

However, it would already be nice if conda would work (between updates) for
the scenario of only one guix profile per user. That is, perhaps we can
simply refer to "${HOME}/.guix-profile" as conda_prefix.



This is the last of the conda-related bugs I planned to submit. My goal is
to get conda to work well enough within guix so we can convince conda-users
to try guix, and then, over time, hopefully switch over to guix entirely.

Hugo

[-- Attachment #2: Type: text/html, Size: 3000 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-02 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 13:09 bug#59776: Conda hardcodes guix hash in .bashrc Hugo Buddelmeijer

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).