ROCm/rocm_smi_lib

installing `python-is-python3` into rocm container removes all rocm packages

bertwesarg opened this issue · 3 comments

Not sure, if this is the right place, but I played around with the ROCm docker images but I also needed Python3 to be the default, thus I was trying to install python-is-python3 but this removes all ROCm packages again:

$ docker run --rm -it rocm/dev-ubuntu-20.04:5.2.3
# apt-get update -q
# apt-get install -q -y --no-install-recommends apt-utils
# apt-get upgrade -q -y --no-install-recommends
# apt-get install --no-install-recommends python-is-python3
Reading package lists... Done  
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:

Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  hip-runtime-amd openmp-extras python-is-python2 rocm-clang-ocl rocm-dev rocm-llvm rocm-utils
The following NEW packages will be installed:
  python-is-python3
0 upgraded, 1 newly installed, 7 to remove and 0 not upgraded.
Need to get 2364 B of archives.
After this operation, 85.8 MB disk space will be freed.

As the rocm-smi-lib packages is a known Python user, I suspect it has something to do with its dependencies. If you have other ideas how to prevent these removals, that would be appreciated too. Thanks.

Seems like a strong dependency from one of ROCm package is getting removed as python-is-python3 is installed and hence ROCm as well. Looking into which one is causing this and why.

I updated the description with a working reproducer.

After digging further it is the dependency on python in rocm-llvm that is causing this behavior.

python-is-python3 sets the field Breaks: python that is believed to trigger this.

rocm-llvm is updated with dependency specifically to python3 and upcoming release should not cause above behavior.
Adding further more, we are investigating if a dependency to any version of python can be removed from rocm-llvm.

dpkg -I python-is-python3_3.8.2-4_all.deb
new Debian package, version 2.0.
size 2364 bytes: control archive=840 bytes.
961 bytes, 25 lines control
155 bytes, 2 lines md5sums
Package: python-is-python3
Source: what-is-python (4)
Version: 3.8.2-4
Architecture: all
Maintainer: Dimitri John Ledkov xnox@ubuntu.com
Installed-Size: 10
Depends: python3
Breaks: python, python-is-python2, python-is-python2-but-deprecated
Replaces: python, python-is-python2, python-is-python2-but-deprecated
Section: python
Priority: optional
Multi-Arch: allowed
Description: symlinks /usr/bin/python to python3