Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package conflicts when installing client bindings #363

Open
maartenbeeckmans opened this issue Jan 12, 2022 · 3 comments
Open

Package conflicts when installing client bindings #363

maartenbeeckmans opened this issue Jan 12, 2022 · 3 comments

Comments

@maartenbeeckmans
Copy link
Contributor

When I'm installing client bindings for some custom scripting with packages from the rpm repository, there are package conflics as multiple files are owned by the same repository.

python3-pulpcore-client and python3-pulpcore have conflicts on the same file
The same is happening for python3-pulpcore-client and python3-pulp-rpm-client

Already tried the option --best but that isn't helping.

Using a mirror (updated to upstream) of the pulpcore 3.14 repository
Vm is running EL8

[[email protected] ~]# dnf install python3-pulp-rpm-client python3-pulpcore-client
Centos Appstream                                                                                                                                             53 MB/s | 8.0 MB     00:00
Centos BaseOS                                                                                                                                                21 MB/s | 2.7 MB     00:00
Centos Powertools                                                                                                                                            18 MB/s | 2.5 MB     00:00
Pulpcore 3.14                                                                                                                                               515 kB/s | 242 kB     00:00
Upstream                                                                                                                                                    3.5 MB/s | 395 kB     00:00
Dependencies resolved.
============================================================================================================================================================================================
 Package                                                 Architecture                           Version                                      Repository                                Size
============================================================================================================================================================================================
Installing:
 python3-pulp-rpm-client                                 noarch                                 3.13.3-1.el8                                 pulpcore                                 181 k
 python3-pulpcore-client                                 noarch                                 3.14.1-1.el8                                 pulpcore                                 173 k

Transaction Summary
============================================================================================================================================================================================
Install  2 Packages

Total download size: 353 k
Installed size: 3.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): python3-pulp-rpm-client-3.13.3-1.el8.noarch.rpm                                                                                                      1.0 MB/s | 181 kB     00:00
(2/2): python3-pulpcore-client-3.14.1-1.el8.noarch.rpm                                                                                                      1.0 MB/s | 173 kB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                       2.0 MB/s | 353 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
  file /usr/lib/python3.6/site-packages/pulpcore/__init__.py from install of python3-pulpcore-client-3.14.1-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.opt-1.pyc from install of python3-pulpcore-client-3.14.1-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.pyc from install of python3-pulpcore-client-3.14.1-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__init__.py from install of python3-pulp-rpm-client-3.13.3-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.opt-1.pyc from install of python3-pulp-rpm-client-3.13.3-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.pyc from install of python3-pulp-rpm-client-3.13.3-1.el8.noarch conflicts with file from package python3-pulpcore-3.14.9-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.opt-1.pyc conflicts between attempted installs of python3-pulp-rpm-client-3.13.3-1.el8.noarch and python3-pulpcore-client-3.14.1-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/__pycache__/__init__.cpython-36.pyc conflicts between attempted installs of python3-pulp-rpm-client-3.13.3-1.el8.noarch and python3-pulpcore-client-3.14.1-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/client/__pycache__/__init__.cpython-36.opt-1.pyc conflicts between attempted installs of python3-pulp-rpm-client-3.13.3-1.el8.noarch and python3-pulpcore-client-3.14.1-1.el8.noarch
  file /usr/lib/python3.6/site-packages/pulpcore/client/__pycache__/__init__.cpython-36.pyc conflicts between attempted installs of python3-pulp-rpm-client-3.13.3-1.el8.noarch and python3-pulpcore-client-3.14.1-1.el8.noarch
@ekohl
Copy link
Member

ekohl commented Jan 12, 2022

I wonder if this is also a problem in upstream. It's odd to me that they chose the pulpcore.client namespace. It implies the client tools need pulpcore to be installed too, but that's not logical.

@maartenbeeckmans
Copy link
Contributor Author

Did some further investigation in a python container:

  1. when I only install pulpcore-client with pip it creates the following files:
root@88697ba93215:/usr/local/lib/python3.10/site-packages/pulpcore# pwd
/usr/local/lib/python3.10/site-packages/pulpcore
root@88697ba93215:/usr/local/lib/python3.10/site-packages/pulpcore# ls
__init__.py  __pycache__  client

root@88697ba93215:/usr/local/lib/python3.10/site-packages/pulpcore/client# pwd
/usr/local/lib/python3.10/site-packages/pulpcore/client
root@88697ba93215:/usr/local/lib/python3.10/site-packages/pulpcore/client# ls
__init__.py  __pycache__  pulpcore

Client bindings are under the pulpcore folder

  1. when I only install pulp-rpm-client with pip it creates the following files
root@e84e84946736:/usr/local/lib/python3.10/site-packages/pulpcore# pwd
/usr/local/lib/python3.10/site-packages/pulpcore
root@e84e84946736:/usr/local/lib/python3.10/site-packages/pulpcore# ls
__init__.py  __pycache__  client

root@e84e84946736:/usr/local/lib/python3.10/site-packages/pulpcore/client# pwd
/usr/local/lib/python3.10/site-packages/pulpcore/client
root@e84e84946736:/usr/local/lib/python3.10/site-packages/pulpcore/client# ls
__init__.py  __pycache__  pulp_rpm

Client bindings are under the pulp_rpm folder

  1. when I install both pulpcore-client and pulp-rpm-client with pip it creates the following files
root@0150e93eb1dd:/usr/local/lib/python3.10/site-packages/pulpcore# pwd
/usr/local/lib/python3.10/site-packages/pulpcore
root@0150e93eb1dd:/usr/local/lib/python3.10/site-packages/pulpcore# ls
__init__.py  __pycache__  client

root@0150e93eb1dd:/usr/local/lib/python3.10/site-packages/pulpcore/client# pwd
/usr/local/lib/python3.10/site-packages/pulpcore/client
root@0150e93eb1dd:/usr/local/lib/python3.10/site-packages/pulpcore/client# ls
__init__.py  __pycache__  pulp_rpm  pulpcore

Client bindings are installed under the pulp_rpm and pulpcore folders

For testing I was using the python:bullseye container with python 3.10 installed, but that shouldn't really matter

So when installing it with pip, some files like the __init__.py and __pycache__ folder and subfiles are managed by both pip packages. Pip doesn't really care about it but yum/dnf/rpm does.

No idea how we should proceed with this.

Looks indeed that they are installed in the same namespace.

@ekohl
Copy link
Member

ekohl commented Jan 14, 2022

I think this should be taken up with upstream. I know Python has a mechanism with .pth files but I've never used it and don't know if it's really a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants