Skip to content

Commit b9f003c

Browse files
authored
Fix "Conda init bash" issue. (#14458)
1 parent 9467e11 commit b9f003c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

SPECS/conda/conda.spec

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Cross-platform, Python-agnostic binary package manager
22
Name: conda
33
Version: 24.3.0
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: BSD-3-Clause AND Apache-2.0
66
# The conda code is BSD-3-Clause
77
# adapters/ftp.py is Apache-2.0
@@ -44,7 +44,6 @@ BuildRequires: python3-setuptools
4444
BuildRequires: python3-setuptools_scm
4545
BuildRequires: python3-trove-classifiers
4646
BuildRequires: sed
47-
4847
Requires: python%{python3_pkgversion}-conda = %{version}-%{release}
4948

5049
%?python_enable_dependency_generator
@@ -187,13 +186,14 @@ mkdir -p %{buildroot}%{_localstatedir}/cache/conda/pkgs/cache
187186

188187
# install does not create the directory on EL7
189188
install -m 0644 -Dt %{buildroot}/etc/profile.d/ conda/shell/etc/profile.d/conda.{sh,csh}
189+
install -m 0644 -Dt %{buildroot}/etc/profile.d/ conda/shell/conda.xsh
190190
sed -r -i -e '1i [ -z "$CONDA_EXE" ] && CONDA_EXE=%{_bindir}/conda' \
191191
-e '/PATH=.*condabin/s|PATH=|[ -d $(dirname "$CONDA_EXE")/condabin ] \&\& PATH=|' %{buildroot}/etc/profile.d/conda.sh
192192
sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \
193193
-e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh
194-
install -m 0644 -Dt %{buildroot}%{_datadir}/fish/vendor_conf.d/ conda/shell/etc/fish/conf.d/conda.fish
194+
install -m 0644 -Dt %{buildroot}/etc/fish/conf.d/ conda/shell/etc/fish/conf.d/conda.fish
195195
sed -r -i -e '1i set -gx CONDA_EXE "/usr/bin/conda"\nset _CONDA_ROOT "/usr"\nset _CONDA_EXE "/usr/bin/conda"\nset -gx CONDA_PYTHON_EXE "/usr/bin/python3"' \
196-
%{buildroot}%{_datadir}/fish/vendor_conf.d/conda.fish
196+
%{buildroot}/etc/fish/conf.d/conda.fish
197197

198198
# Install bash completion script
199199
install -m 0644 -Dt %{buildroot}%{bash_completionsdir}/ %SOURCE1
@@ -384,11 +384,11 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} conda info
384384
%{_bindir}/conda
385385
%{_bindir}/conda-env
386386
%{bash_completionsdir}/conda
387-
# TODO - better ownership for fish/vendor_conf.d
388-
%dir %{_datadir}/fish/vendor_conf.d
389-
%{_datadir}/fish/vendor_conf.d/conda.fish
387+
%dir /etc/fish/conf.d
388+
/etc/fish/conf.d/conda.fish
390389
/etc/profile.d/conda.sh
391390
/etc/profile.d/conda.csh
391+
/etc/profile.d/conda.xsh
392392

393393
%files tests
394394
%{_datadir}/conda/tests/
@@ -402,6 +402,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} conda info
402402
%{_datadir}/conda/condarc.d/
403403

404404
%changelog
405+
* Thu Aug 07 2025 Riken Maharjan <[email protected]> - 24.3.0-4
406+
- Add missing conda.xsh file to /etc/profile.d
407+
- also move conda.fish to /etc/fish/conf.d/
408+
405409
* Thu May 01 2025 Riken Maharjan <[email protected]> - 24.3.0-3
406410
- Skip some test cases that are failing in the current version of conda using Fedora (License: MIT)
407411

0 commit comments

Comments
 (0)