From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 6EYtCHgMjWPN8gAAbAwnHQ (envelope-from ) for ; Sun, 04 Dec 2022 22:09:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IFAjCHgMjWMiJQEA9RJhRA (envelope-from ) for ; Sun, 04 Dec 2022 22:09:12 +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 BA1E9B079 for ; Sun, 4 Dec 2022 22:09:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1wER-0002Ea-VN; Sun, 04 Dec 2022 16:09:03 -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 1p1wEQ-0002E4-GY for bug-guix@gnu.org; Sun, 04 Dec 2022 16:09: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 1p1wEQ-00018I-93 for bug-guix@gnu.org; Sun, 04 Dec 2022 16:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1wEQ-0000QQ-4E for bug-guix@gnu.org; Sun, 04 Dec 2022 16:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59771: Conda 22.9.0 needs "sudo" as dependency Resent-From: Hugo Buddelmeijer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 04 Dec 2022 21:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59771 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tobias Geerinckx-Rice Cc: 59771@debbugs.gnu.org X-Debbugs-Original-Cc: bug-guix@gnu.org, 59771@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16701881151614 (code B ref -1); Sun, 04 Dec 2022 21:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2022 21:08:35 +0000 Received: from localhost ([127.0.0.1]:59745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wDz-0000Py-9B for submit@debbugs.gnu.org; Sun, 04 Dec 2022 16:08:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:41298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wDw-0000Pr-KX for submit@debbugs.gnu.org; Sun, 04 Dec 2022 16:08:34 -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 1p1wDw-0002BJ-EH for bug-guix@gnu.org; Sun, 04 Dec 2022 16:08:32 -0500 Received: from mail-ej1-f52.google.com ([209.85.218.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1wDu-0000Gk-6h for bug-guix@gnu.org; Sun, 04 Dec 2022 16:08:32 -0500 Received: by mail-ej1-f52.google.com with SMTP id n21so23440445ejb.9 for ; Sun, 04 Dec 2022 13:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EIuGahCSa/TxQGoIG29Zo4X4mfXW9Jj8KUNhv3oqxRY=; b=2+FRAU8l27TNA4jzmwnF870MhBDsYdNrx2xE5DEqS+VroOEODGS9HhbNRL/mcwoUVU lJqtXefxYxV4GA2pFm0RTFv4CIDl4HziKr++a8e+77TczDvHkLWCuJ1Q3sqMhukaq/Ky IFkXWefzEC6BKSsbjlX4nD3BokiPKbSuoyyRkFV2yN0etQe66u8dHjZzC8E8mfbwioak ewodaMEoReJ0512Xt9AYkYO0l2cVePoW8L7YHNwno16i1Xc4D2Ir6NKkuqQZYS4HvutW UyUqb7t6yr0/dMc+YB6yUy2Ipic+gQeiqSmYh15eZGqiUBaH870icS+NALVpjGplkdvi FSvA== X-Gm-Message-State: ANoB5pmsr+pizev27MK7LOsiFOD5ZFkwPfGRJjhaCksl0hwkvVpMjT2I L2dI325E6hUwNoZIcOcqkIqYJ6K7iCfWlso2L44= X-Google-Smtp-Source: AA0mqf69EwIktFKH9PBCzopDL4icrt6/QaqbXXzffk/X63uf6NdyOq4kSvkmYXO+9T47TpDoasll+aY8/dnRB0FNo44= X-Received: by 2002:a17:906:a212:b0:7b2:804f:a31c with SMTP id r18-20020a170906a21200b007b2804fa31cmr50521866ejy.523.1670188107853; Sun, 04 Dec 2022 13:08:27 -0800 (PST) MIME-Version: 1.0 References: <87359y3tqn.fsf@nckx> In-Reply-To: From: Hugo Buddelmeijer Date: Sun, 4 Dec 2022 22:08:16 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000e074c805ef06f8e4" Received-SPF: pass client-ip=209.85.218.52; envelope-from=blackshift@gmail.com; helo=mail-ej1-f52.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.129, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=1670188151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=EIuGahCSa/TxQGoIG29Zo4X4mfXW9Jj8KUNhv3oqxRY=; b=hagDiJPfUckb3HAOTU/7q59wvjq60mz6l+L5e6Inwsu5Zprqjg52do81zVsD9L+zW3+sHr Pz3yyf1o78eoXgDT6ANPXAtDmmDXZ5zQqXL4RjlElXP+kDyGK5/FVgfoEfzLrHiGvLJPba PFlnkuyrGsY8z53J0JgXr7mm0nuPEl1vs3R43xWAoiVDHZ8C478ZELVXfPNQTEityEnRXR QYw7pgMyCDd3RdIMmHtsdtkOIZrMBn2xWz9+1UA5EooeTgNmH5fDIeFHyA4aW0vLeEOYAG S4HlecOhrUHq13wk/fZc0Xgq2R7MbjdH9pZKpBy+SrBsYov0BGxLYiLZcr27ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670188151; a=rsa-sha256; cv=none; b=KWZS6Ke8yNulUC1g3m76WKGP32WVoke8L5NDlyDHqTETIVVCd7gcb8UG8KxYC/d/FAWH12 p5Dd8h9WQqTq9UdkS7In0qBmV+oEpFK8QIyix+ZCxzSK+JsE+zGDZYzwbi7VgtT3jO+o31 9o5F+5Hwk3NTvcG/4Xhp63NkfftaAAL4v5hPV6V8+8cNIU91Uv1tqb11TznQrD85DakCO/ c2z9acsmagcrCuHyQgs0iXgC3wiA1biw3e94ZBwHGzVHqlhexYjbhLSzkjtL2sB+MJ1RUq zuAC/bdC2MoEPuXvucwrYP584v6jd5jptigdv/Ob4MEndkYZCQHZKtSR9rYZow== 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: -3.46 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: BA1E9B079 X-Spam-Score: -3.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6buTEf+BQuaV --000000000000e074c805ef06f8e4 Content-Type: text/plain; charset="UTF-8" On Sat, 3 Dec 2022 at 20:11, Hugo Buddelmeijer wrote: > > But maybe 59771 (this bug), 59772 (also due to sudo), and 59776 (hardcoded > paths), all three could be resolved in a more guix-y way. The problem in > these three bugs is that "conda init" wants to add something to ~/.bashrc > that adds some bash functions to the environment (and the sole purpose of > those bash functions seems to be to update PS1). However, I was wondering, > would it be possible to have guix itself add those bash functions to the > environment? > > As in, we add some code to the guix conda package that ensures that if > guix enters an environment with conda, that it somehow adds the necessary > bash functions to the environment. So "conda init" and changes to ~/.bashrc > would not even be necessary (thus fixing these bugs). That is, that the > shell spawned through "guix shell -C conda" would have these bash functions > directly in the environment. Would something like this be possible? > No, adding bash functions automatically to a Guix environment seems impossible. The guile function load-profile allows packages to add path-like environment variables through the search-path-specification declaration, but not any other environment variables, let alone shell functions. That seems reasonable enough. One reason I'd like to move away from conda is that I don't think the way conda handles environment variables is tenable. So maybe it is worthwhile to make sure that "conda init" does what it is expected to do (that is, add the code that loads these bash functions to .bashrc), even though it is not really guix-y. --000000000000e074c805ef06f8e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, 3 Dec 2022 at 20:11, Hugo Buddelmeijer <hugo@buddelmeijer.nl> wrote:

But maybe 59771 (this bug), 59772 (also due to sudo), and 59= 776 (hardcoded paths), all three could be resolved in a more guix-y way. Th= e problem in these three bugs is that "conda init" wants to add s= omething to ~/.bashrc that adds some bash functions to the environment (and= the sole purpose of those bash functions seems to be to update PS1). Howev= er, I was wondering, would it be possible to have guix itself add those bas= h functions to the environment?

As in, we add some= code to the guix conda package that ensures that if guix enters an environ= ment with conda, that it somehow adds the necessary bash functions to the e= nvironment. So "conda init" and changes to ~/.bashrc would not ev= en be necessary (thus fixing these bugs). That is, that the shell spawned t= hrough "guix shell -C conda" would have these bash functions dire= ctly in the environment. Would something like this be possible?
=

No, adding bash functions automatically to= a Guix environment seems impossible. The guile function load-profile allow= s packages to add path-like environment variables through the search-path-s= pecification declaration, but not any other environment variables, let alon= e shell functions.

That seems reasonable enough. O= ne reason I'd like to move away from conda is that I don't think th= e way conda handles environment variables is tenable. So maybe it is worthw= hile to make sure that "conda init" does what it is expected to d= o (that is, add the code that loads these bash functions to .bashrc), even = though it is not really guix-y.

=C2=A0
--000000000000e074c805ef06f8e4--