You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solution to issue cannot be found in the documentation.
I checked the documentation.
Issue
Scenario: given some form of conda (including miniforge) is installed as root on an openSUSE or SLES machine. When running commands that require a repository cache refresh, such as zypper refresh, the zypper command fails to cache the repository metadata.
The reason for this is due to zypper calling repo2solv to convert the repository metadata into a .solv file. SUSE ships a compiled repo2solv as /usr/bin/repo2solv, but conda puts itself first on the PATH when integrated into the shell. conda now ships libsolv as part of the libmamba dependency solver, thus libsolv gets installed into the base conda environment, including a copy of repo2solv.
Since conda puts itself (and its $CONDA_LOCATION/bin folder) first on the PATH, zypper ends up calling this conda version of repo2solv instead of the version shipped by SUSE.
The version of repo2solv shipped by this libsolv package is NOT compiled with the ENABLE_RPMMD=1 flag, and thus does not support rpm-md style repositories, which all SUSE repositories are. So when attempting to parse a repository metadata, this version of repo2solv just exits immediately with the error message "rpmmd repo type is not supported", as a hardcoded error case.
Other distros ship libsolv compiled with the ENABLE_RPMMD flag, such as Rocky Linux, and obviously SUSE does.
We'd just need to enable that CMake define here, or any of the other CMake defines that transitively set that value to ON (you can search ENABLE_RPMMD in this file).
Which would fix this one issue, but in general if we're going to be replacing the system version of a core tool like part of the distro package manager... it should be compiled in a 100% identical manner to the upstream (which is hard since every distro compiles this slightly differently).
Reproduction:
Install OpenSUSE Leap 15.6 (I believe this goes quite a ways back in SUSE, and also impacts SLES)
As root user, install latest miniforge
Enable shell integration for conda (last step in the install process)
Expected Result:
zypper caches are refreshed appropriately
Actual Results:
Every repository is broken with an error like the following:
History:
- 'repo2solv' '-o' '/var/cache/zypp/solv/openSUSE-Leap-15.6-1/solv' '-X' '/var/cache/zypp/raw/openSUSE-Leap-15.6-1'
rpmmd repo type is not supported
Command exited with status 1.
Skipping repository 'openSUSE-Leap-15.6-1' because of the above error.
Other commentary:
This only impacts running conda as root, since if you install conda as a non-root user you won't be impacting the PATH of root and won't interfere with the zypper commands. Running conda as root is a bad idea in general, but I was and that's how I found this.
All forms of conda are pretty intrusive to the PATH, which is pretty annoying. A very basic default conda env ships its own copies of libsolv, zlib, xz, lz, sqlite3, etc etc. Many things where I'd be expecting to be running my distro's installed copy, instead I'm running the conda-forge versions because conda put itself first on my PATH. This really seems like a bad practice to me ... for many security / update / stability reasons. But perhaps that's a topic for the main conda-forge area and not here. I've worked around this by writing a custom shell integration script that puts conda after the default PATH entries, so my distro copies get called first instead of conda's, which I'm sure will break something in conda one day when there's a version mismatch.
Solution to issue cannot be found in the documentation.
Issue
Scenario: given some form of conda (including miniforge) is installed as root on an openSUSE or SLES machine. When running commands that require a repository cache refresh, such as
zypper refresh
, the zypper command fails to cache the repository metadata.The reason for this is due to zypper calling
repo2solv
to convert the repository metadata into a .solv file. SUSE ships a compiled repo2solv as/usr/bin/repo2solv
, but conda puts itself first on thePATH
when integrated into the shell.conda
now shipslibsolv
as part of the libmamba dependency solver, thuslibsolv
gets installed into the base conda environment, including a copy ofrepo2solv
.Since conda puts itself (and its
$CONDA_LOCATION/bin
folder) first on thePATH
, zypper ends up calling this conda version ofrepo2solv
instead of the version shipped by SUSE.The version of
repo2solv
shipped by this libsolv package is NOT compiled with theENABLE_RPMMD=1
flag, and thus does not supportrpm-md
style repositories, which all SUSE repositories are. So when attempting to parse a repository metadata, this version ofrepo2solv
just exits immediately with the error message "rpmmd repo type is not supported", as a hardcoded error case.Other distros ship libsolv compiled with the
ENABLE_RPMMD
flag, such as Rocky Linux, and obviously SUSE does.We'd just need to enable that CMake define here, or any of the other CMake defines that transitively set that value to ON (you can search
ENABLE_RPMMD
in this file).Which would fix this one issue, but in general if we're going to be replacing the system version of a core tool like part of the distro package manager... it should be compiled in a 100% identical manner to the upstream (which is hard since every distro compiles this slightly differently).
Reproduction:
root
user, install latestminiforge
conda
(last step in the install process)rm -rf /var/cache/zypp/solv
zypper refresh
Expected Result:
zypper caches are refreshed appropriately
Actual Results:
Every repository is broken with an error like the following:
Other commentary:
This only impacts running conda as
root
, since if you install conda as a non-root user you won't be impacting thePATH
ofroot
and won't interfere with thezypper
commands. Running conda asroot
is a bad idea in general, but I was and that's how I found this.All forms of conda are pretty intrusive to the
PATH
, which is pretty annoying. A very basic default conda env ships its own copies oflibsolv
,zlib
,xz
,lz
,sqlite3
, etc etc. Many things where I'd be expecting to be running my distro's installed copy, instead I'm running the conda-forge versions because conda put itself first on myPATH
. This really seems like a bad practice to me ... for many security / update / stability reasons. But perhaps that's a topic for the main conda-forge area and not here. I've worked around this by writing a custom shell integration script that puts conda after the default PATH entries, so my distro copies get called first instead of conda's, which I'm sure will break something in conda one day when there's a version mismatch.Installed packages
Environment info
The text was updated successfully, but these errors were encountered: