From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8BGsAYX5iWPFOgEAbAwnHQ (envelope-from ) for ; Fri, 02 Dec 2022 14:11:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QHnrAIX5iWOtXQAAG6o9tA (envelope-from ) for ; Fri, 02 Dec 2022 14:11:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AAEB2BBDF for ; Fri, 2 Dec 2022 14:11:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p15op-0002E6-31; Fri, 02 Dec 2022 08:11:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p15ok-0002Dl-RM for bug-guix@gnu.org; Fri, 02 Dec 2022 08:11:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p15ok-00026a-I9 for bug-guix@gnu.org; Fri, 02 Dec 2022 08:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p15ok-0005GR-AO for bug-guix@gnu.org; Fri, 02 Dec 2022 08:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59776: Conda hardcodes guix hash in .bashrc Resent-From: Hugo Buddelmeijer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 02 Dec 2022 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59776 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 59776@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166998661420208 (code B ref -1); Fri, 02 Dec 2022 13:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Dec 2022 13:10:14 +0000 Received: from localhost ([127.0.0.1]:46642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15ny-0005Fr-4y for submit@debbugs.gnu.org; Fri, 02 Dec 2022 08:10:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:45024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15nv-0005Fl-SN for submit@debbugs.gnu.org; Fri, 02 Dec 2022 08:10:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p15nu-00029u-2E for bug-guix@gnu.org; Fri, 02 Dec 2022 08:10:11 -0500 Received: from mail-ej1-f43.google.com ([209.85.218.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p15np-0001jj-Aa for bug-guix@gnu.org; Fri, 02 Dec 2022 08:10:09 -0500 Received: by mail-ej1-f43.google.com with SMTP id vv4so11421915ejc.2 for ; Fri, 02 Dec 2022 05:10:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RJ7tly0lkVkWUO9FQ6j8vyRMWDF2h2o8ae/xcnGMDmY=; b=cKlYCTEgxhW/Td72mZKYIPR8AV0aPXL/t15ZbTIBcp43ID9+5Koi+3KV38qpsPPjLO +oMgqtJ1gpiQt5WNKlkPBqyMDw5oJssGi7jYE4ySCxfRCe3h8GUCJH62IvHXUlaj2j/9 DwMLx8HvgFHWG8XSP9aMVX1UvDY2lbUIJPAhrNNPZbRTRVkP9fpG3VnhPzAJyU+jfnes vlg5CUbUx5nKXddKCNNNMy19ce4C+Oac6GBAmf/aQPIVhfYWlki6gUr02Rq9xiVXMy47 m881z96H6W6ymBT+F7ob9xEi1/mJRdpy406Ti/P5X/yor2YLR+VjT9zODTN2TBca6WtO Xqnw== X-Gm-Message-State: ANoB5pnZ2eCwKPB16hd/9OfI3gPtTS/Wr/VSWJJPEXvirIlwUGMEq0ej 1ROzKv6jchima4tV8dejFyCgWlq9ySt8n01R2FNSrlXpOdTlWA== X-Google-Smtp-Source: AA0mqf7dIxgKSw4a/I27voTb9HdHCRit9ZMShZRHRtpSAPAMyirfsAt13sreTvnenvpwkIP5QfE6RagezJA+DB6nYCc= X-Received: by 2002:a17:906:43d0:b0:78d:a01b:b474 with SMTP id j16-20020a17090643d000b0078da01bb474mr47207338ejn.8.1669986603138; Fri, 02 Dec 2022 05:10:03 -0800 (PST) MIME-Version: 1.0 From: Hugo Buddelmeijer Date: Fri, 2 Dec 2022 14:09:51 +0100 Message-ID: Content-Type: multipart/alternative; boundary="00000000000042839405eed80e91" Received-SPF: pass client-ip=209.85.218.43; envelope-from=blackshift@gmail.com; helo=mail-ej1-f43.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669986692; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=RJ7tly0lkVkWUO9FQ6j8vyRMWDF2h2o8ae/xcnGMDmY=; b=qs4FWUtvY2xIdPjf5awMb9+WgDwsGjAoDV4z+kCAisaqjo2zYdf8jiXaw+U68IA+baER7l kMV4YEAo9NHd7tYp0YZhrAMPf3IZ9HgX7Ji/hcLVObpGwZehlCjsM4XLgfimfUJ4AYsUoW TwhoObupANCtewfmOSPIdzrWhjw2GpOpoOFmUH0LFjJL3Jg8B8uA7a50j/MqNZtHHvMo5k fGeYl8q7Wksg9jojnDJYtf7d4jc5JwuH1PtGPYbLlRFO3Yo6dAUQv5CC2XqKaCmeEQ/Q70 3vB0nZCJhZJon4lX6verVxvxoaIuSM4/PDyFtOIXot1nnDrY73JfnbiVpmlqRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669986692; a=rsa-sha256; cv=none; b=VGAgdFPjrXOhycLD/xTuNfr9le78QiKVL8lNxacGtv+3+vh7vylqxzrG67ac/+MyLjEX3c VyuSEyldS9Wy9WaFNp8Sy3myp9Jcl9KYNwurYMx9PGNHFVEopawseS/QCkMEGGM9PvqtPW CFUe7rQp2wDAWsPYJt+RLA5zamjGE8kaScZNeNDqphPFQHxiWC/wQ9GbVG1ZwoT+UcgMcn jL6IFT7Wj8a+0NQP0rZCzz5PrNA0NdJzD7jZvcXccPRnaH7tjjrN3ipPtirREfkvsbXvNE I517jehdJwwNVDON64YrXTOzhXDbP0nN8WsPJ0EObVsZDUly+oLX6VNlehTTyw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.67 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AAEB2BBDF X-Spam-Score: -1.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4dREWT6tW4dG --00000000000042839405eed80e91 Content-Type: text/plain; charset="UTF-8" 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 --00000000000042839405eed80e91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

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

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

# >>> conda initialize >= ;>>
# !! Contents within this block are managed by 'conda init= ' !!
__conda_setup=3D"$('/gnu/store/kihiw0r9r595jwhxlydkl0f= 5vvn53r1z-conda-22.9.0/bin/conda' 'shell.bash' 'hook' 2= > /dev/null)"
if [ $? -eq 0 ]; then
=C2=A0 =C2=A0 eval "= $__conda_setup"
else
=C2=A0 =C2=A0 if [ -f "/gnu/store/kihi= w0r9r595jwhxlydkl0f5vvn53r1z-conda-22.9.0/etc/profile.d/conda.sh" ]; t= hen
=C2=A0 =C2=A0 =C2=A0 =C2=A0 . "/gnu/store/kihiw0r9r595jwhxlydkl= 0f5vvn53r1z-conda-22.9.0/etc/profile.d/conda.sh"
=C2=A0 =C2=A0 else=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 export PATH=3D"/gnu/store/kihiw0r9r595= jwhxlydkl0f5vvn53r1z-conda-22.9.0/bin:$PATH"
=C2=A0 =C2=A0 fi
fi=
unset __conda_setup
# <<< conda initialize <<<= ;


It seems that the contents of ~/.= bashrc are based on the file conda/core/initialize.py:
It refers to a conda_prefix (and co= nda_exe) variable. These should somehow refer to the guix profile, not to t= he packages in the store.

<= /span>
I'm not yet experienced eno= ugh to propose how to tackle this. It seems hard to do this in a generic wa= y, 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, perha= ps we can simply refer to "${HOME}/.guix-profile" as conda_prefix= .



This is the last of the conda-re= lated 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 tim= e, hopefully switch over to guix entirely.

= Hugo





=

--00000000000042839405eed80e91--