4 Star 0 Fork 3

OpenCloudOS Stream/conda

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-shell-assume-shell-plugins-are-in-etc.patch 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
abushwang 提交于 2023-12-11 15:16 . init build
diff --git a/conda/activate.py b/conda/activate.py
index 8149162..0d751e3 100644
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -918,13 +918,7 @@ class PosixActivator(_Activator):
set_var_tmpl = "%s='%s'"
run_script_tmpl = '. "%s"'
- hook_source_path = join(
- CONDA_PACKAGE_ROOT,
- "shell",
- "etc",
- "profile.d",
- "conda.sh",
- )
+ hook_source_path = '/etc/profile.d/conda.sh'
def _update_prompt(self, set_vars, conda_prompt_modifier):
ps1 = self.environ.get("PS1", "")
@@ -971,13 +965,7 @@ class CshActivator(_Activator):
set_var_tmpl = "set %s='%s'"
run_script_tmpl = 'source "%s"'
- hook_source_path = join(
- CONDA_PACKAGE_ROOT,
- "shell",
- "etc",
- "profile.d",
- "conda.csh",
- )
+ hook_source_path = '/etc/profile.d/conda.csh'
def _update_prompt(self, set_vars, conda_prompt_modifier):
prompt = self.environ.get("prompt", "")
@@ -1033,7 +1021,7 @@ class XonshActivator(_Activator):
else 'source-bash --suppress-skip-message -n "%s"'
)
- hook_source_path = join(CONDA_PACKAGE_ROOT, "shell", "conda.xsh")
+ hook_source_path = "/etc/profile.d/conda.xsh"
def _hook_preamble(self) -> str:
return '$CONDA_EXE = "%s"' % self.path_conversion(context.conda_exe)
@@ -1074,14 +1062,7 @@ class FishActivator(_Activator):
set_var_tmpl = 'set -g %s "%s"'
run_script_tmpl = 'source "%s"'
- hook_source_path = join(
- CONDA_PACKAGE_ROOT,
- "shell",
- "etc",
- "fish",
- "conf.d",
- "conda.fish",
- )
+ hook_source_path = "/etc/fish/conf.d/conda.fish"
def _hook_preamble(self) -> str:
if on_win:
diff --git a/conda/base/context.py b/conda/base/context.py
index c22fafd..cf29eb6 100644
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -739,7 +739,7 @@ class Context(Configuration):
def av_data_dir(self):
"""Where critical artifact verification data (e.g., various public keys) can be found."""
# TODO (AV): Find ways to make this user configurable?
- return join(self.conda_prefix, "etc", "conda")
+ return '/etc/conda'
@property
def signing_metadata_url_base(self):
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/conda.git
git@gitee.com:opencloudos-stream/conda.git
opencloudos-stream
conda
conda
master

搜索帮助