Bug 29815 - Question: The package python3-python-magic (python3-magic) "displaces" other packages
Summary: Question: The package python3-python-magic (python3-magic) "displaces" other ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Python Stack Maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-25 18:38 CET by Alex Kotov
Modified: 2021-12-27 20:44 CET (History)
2 users (show)

See Also:
Source RPM: python-magic-0.4.18-1.mga8, file-5.39-4.mga8
CVE:
Status comment:


Attachments

Description Alex Kotov 2021-12-25 18:38:11 CET
Hello, friends. I really need your advice... :)

To work with cloud storage, I put together a package for myself 's3cmd' (Tool for accessing Amazon Simple Storage Service) from the package Fedora-35. And later I wrote a GUI for him so that I wouldn't have to do anything with my hands in the console - 's3cmd-gui': https://github.com/AKotov-dev/s3cmd-gui

Everything works great, but I have a question... In dependencies s3cmd there is a package python3-python-magic (python3-magic), which "displaces" packages from the system during installation python3-file-magic-5.39-4.mga8.noarch, rpmlint-1.11-4.mga8.noarch and rpmlint-mageia-policy-0.2.29-7.mga8.noarch.

I decided to install the package 'python3-python-magic' separately and here is the result:

> urpmi --auto python3-python-magic
The following packages have to be removed for others to be upgraded:
python3-file-magic-5.39-4.mga8.noarch
 (due to conflicts with python3-python-magic)
rpmlint-1.11-4.mga8.noarch
 (due to missing python3dist(file-magic))
rpmlint-mageia-policy-0.2.29-7.mga8.noarch
 (due to unsatisfied rpmlint >= 1.4-4)
Marking python3-python-magic as manually installed, it won't be auto-orphaned
writing /var/lib/rpm/installed-through-deps.list

    $MIRRORLIST: media/core/release/python3-python-magic-0.4.18-1.mga8.noarch.rpm
installing python3-python-magic-0.4.18-1.mga8.noarch.rpm from /var/cache/urpmi/rpms                           
Preparing...                     ############################################################################
      1/1: python3-python-magic  ############################################################################
removing package rpmlint-mageia-policy-0.2.29-7.mga8.noarch
      1/3: removing rpmlint-mageia-policy-0.2.29-7.mga8.noarch
                                 ############################################################################
removing package rpmlint-1.11-4.mga8.noarch
      2/3: removing rpmlint-1.11-4.mga8.noarch
                                 ############################################################################
removing package python3-file-magic-5.39-4.mga8.noarch
      3/3: removing python3-file-magic-5.39-4.mga8.noarch
                                 ############################################################################


Here I'm putting everything back on:
---
> urpmi --auto rpmlint
The following package has to be removed for others to be upgraded:
python3-python-magic-0.4.18-1.mga8.noarch
 (due to conflicts with python3-file-magic)

    $MIRRORLIST: media/core/release/python3-file-magic-5.39-4.mga8.noarch.rpm
    $MIRRORLIST: media/core/release/rpmlint-1.11-4.mga8.noarch.rpm                                            
    $MIRRORLIST: media/core/release/rpmlint-mageia-policy-0.2.29-7.mga8.noarch.rpm                            
installing rpmlint-1.11-4.mga8.noarch.rpm python3-file-magic-5.39-4.mga8.noarch.rpm rpmlint-mageia-policy-0.2.29-7.mga8.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ############################################################################
      1/3: python3-file-magic    ############################################################################
      2/3: rpmlint-mageia-policy ############################################################################
      3/3: rpmlint               ############################################################################
removing package python3-python-magic-0.4.18-1.mga8.noarch
      1/1: removing python3-python-magic-0.4.18-1.mga8.noarch
                                 ############################################################################

Question-1: All of the above (the displacement of packages from the system) is a normal reaction of the system to the installation of the package python3-python-magic (python3-magic) or not?

Question-2: Is it possible that as a result of this "replacement" something necessary will fall off in the future?

p.s. If this questions is stupid on my part, I ask you not to hit hard. I am grateful in advance. :)

Sincerely,
Alex
Comment 1 Jani Välimaa 2021-12-26 14:53:43 CET
The conflicts are real in mga8. Multiple packages shipping the same file with different content can't be installed at the same time.

$ urpmf site-packages/magic.py$
python3-python-magic:/usr/lib/python3.8/site-packages/magic.py
python3-file-magic:/usr/lib/python3.8/site-packages/magic.py

I guess python-magic update in mga8 would solve the issue as there aren't conflicting files anymore in cauldron and both pkgs can be installed.

Source RPM: (none) => python-magic-0.4.18-1.mga8, file-5.39-4.mga8
CC: (none) => jani.valimaa

Comment 2 Alex Kotov 2021-12-26 16:51:14 CET
(In reply to Jani Välimaa from comment #1)
> I guess python-magic update in mga8 would solve the issue as there aren't
> conflicting files anymore in cauldron and both pkgs can be installed.
Hi, Jani Välimaa. Thank you for your participation in the solution.

Package Installation Test 'python3-python-magic' in Mageia-9-Cauldron = the same conflict... :(
---
> uname -a
Linux localhost.localdomain 5.15.11-desktop-2.mga9 #1 SMP Fri Dec 24 13:35:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

> urpmi --auto python3-python-magic
The following packages have to be removed for others to be upgraded:
python3-file-magic-5.41-1.mga9.noarch
 (due to conflicts with python3-python-magic)
rpmlint-1.11-5.mga9.noarch
 (due to missing python3dist(file-magic))
rpmlint-mageia-policy-0.2.29-7.mga8.noarch
 (due to unsatisfied rpmlint >= 1.4-4)
Marking python3-python-magic as manually installed, it won't be auto-orphaned
writing /var/lib/rpm/installed-through-deps.list

installing python3-python-magic-0.4.24-2.mga9.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #####################################################################################
      1/1: python3-python-magic  #####################################################################################
removing package rpmlint-mageia-policy-0.2.29-7.mga8.noarch
      1/3: removing rpmlint-mageia-policy-0.2.29-7.mga8.noarch
                                 #####################################################################################
removing package rpmlint-1.11-5.mga9.noarch
      2/3: removing rpmlint-1.11-5.mga9.noarch
                                 #####################################################################################
removing package python3-file-magic-5.41-1.mga9.noarch
      3/3: removing python3-file-magic-5.41-1.mga9.noarch
                                 #####################################################################################

Sincerely,
Alex
Comment 3 Lewis Smith 2021-12-26 21:48:58 CET
Thank you Alex for reporting the problem, and Jani for explaining it.

Under Mageia 8:
 $ urpmf site-packages/magic.py$          [as per Jani]
python3-python-magic:/usr/lib/python3.8/site-packages/magic.py
 [in SRPM python-magic]
python3-file-magic:/usr/lib/python3.8/site-packages/magic.py
 [in SRPM file]
 $ urpmq --whatrequires python3-python-magic
-
 $ urpmq --whatrequires python3-file-magic
lutris
python3-eyed3
python3-file-magic
python3-relatorio
rpmlint

> In dependencies s3cmd there is a package python3-python-magic (python3-magic)
Naive question: can that dependancy be replaced by python3-file-magic?

> there aren't conflicting files anymore in cauldron and
> both pkgs can be installed
What about comment 2? Although that shows a Mageia 8 package amid the M9 ones.

Assigning to the Python people in case they can offer any advice.

Assignee: bugsquad => python

Comment 4 Alex Kotov 2021-12-27 08:11:34 CET
(In reply to Lewis Smith from comment #3)
> Naive question: can that dependancy be replaced by python3-file-magic?
Hi, Lewis. The result was exactly as Lewis Carroll wrote in 'Alice's Adventures in Wonderland' - "Curiouser and curiouser!". :)

If replace 'puthon3-magic' by 'python3-file-magic', then after the build it is not installed:
---
> cd ~/rpmbuild/RPMS/noarch
> urpmi --verbose ./s3cmd-2.2.0-1.mrx8.noarch.rpm
getting lock on urpmi
using mirror http://mirror.math.princeton.edu/pub/mageia/distrib/8/x86_64
examining synthesis file [/var/lib/urpmi/Core Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Core Updates/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Release/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Updates/synthesis.hdlist.cz]
getting exclusive lock on rpm
unlocking urpmi database
unlocking rpm database

Or through dnf (he says there is a conflict)...
---
> dnf install ./*.rpm
determining the fastest mirror (10 hosts).. done.============================] 2.6 kB/s | 801  B     00:00 ETA
Mageia 8 - x86_64                                                              1.9 MB/s |  32 MB     00:16    
determining the fastest mirror (5 hosts).. done.=============================] 2.4 kB/s | 773  B     00:00 ETA
Mageia 8 - x86_64 - Updates                                                    2.2 MB/s |  38 MB     00:16    
Last metadata expiration check: 0:00:14 ago on Mon 27 Dec 2021 01:33:09 AM EST.
Error: 
 Problem: package s3cmd-2.2.0-1.mrx8.noarch requires python3-file-magic, but none of the providers can be installed
  - package python3-file-magic-5.39-4.mga8.noarch conflicts with python3-python-magic provided by python3-python-magic-0.4.18-1.mga8.noarch
  - package python3-python-magic-0.4.18-1.mga8.noarch conflicts with python3-file-magic provided by python3-file-magic-5.39-4.mga8.noarch
  - package s3cmd-2.2.0-1.mrx8.noarch requires python3.8dist(python-magic), but none of the providers can be installed
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
Comment 5 Jani Välimaa 2021-12-27 08:58:19 CET
(In reply to Lewis Smith from comment #3)
> 
> > there aren't conflicting files anymore in cauldron and
> > both pkgs can be installed
> What about comment 2? Although that shows a Mageia 8 package amid the M9
> ones.
> 
> Assigning to the Python people in case they can offer any advice.

Conflicts were removed in cauldron with file-5.41-2.mga9 and python-magic-0.4.24-3.mga9.

* Sun Dec 26 2021 wally <wally> 5.41-2.mga9
+ Revision: 1764005
- drop unneeded conflicts for python3-python-magic in python-file-magic pkg as both pkgs can coexists nowadays

* Sun Dec 26 2021 wally <wally> 0.4.24-3.mga9
+ Revision: 1764004
- add upstream patch to support file 5.41
- drop unneeded conflicts as the pkg can nowadays coexist with python3-file-magic
Comment 6 Alex Kotov 2021-12-27 13:07:30 CET
Hi, Jani Välimaa. Hooray! In Mageia-9-Cauldron everything has worked and there are no more conflicts after update. And my package 's3cmd' has now also been installed without any problems. Thank you very much! :)

Is it possible to fasten the same patch for Mageia-8 in the future? Additionally, I would also ask you to assemble 's3cmd' for Mageia, but an inner voice tells me that I may be sent in an uncertain direction for my indescribable audacity. :)

Sincerely,
Alex
Comment 7 Lewis Smith 2021-12-27 20:16:49 CET
(In reply to Jani Välimaa from comment #5)
> (In reply to Lewis Smith from comment #3)
> > What about comment 2? Although that shows a Mageia 8 package amid the M9
> > ones.
> Conflicts were removed in cauldron with file-5.41-2.mga9 and
> python-magic-0.4.24-3.mga9.
Thanks for this confirmation, Jani.

(In reply to Alex Kotov from comment #4)
> (In reply to Lewis Smith from comment #3)
> > In dependencies s3cmd there is a package python3-python-magic
> > Naive question: can that dependancy be replaced by python3-file-magic?
> Hi, Lewis. The result was exactly as Lewis Carroll wrote in 'Alice's
> Adventures in Wonderland' - "Curiouser and curiouser!". :)
> If replace 'puthon3-magic' by 'python3-file-magic', then after the build it
> is not installed:
My question was silly, I suspect: if you need python3-python-magic, I suppose you need it!
I should have suggested instead (but it no longer matters):
If you can live without rpmlint, lutris (& hence python3-file-magic), then you could have simply accepted their removal.

(In reply to Alex Kotov from comment #6)
> Hi, Jani Välimaa. Hooray! In Mageia-9-Cauldron everything has worked and
> there are no more conflicts after update. And my package 's3cmd' has now
> also been installed without any problems. Thank you very much! :)
Thank you for this good news; we can close this.

> Is it possible to fasten the same patch for Mageia-8 in the future?
Only Jani can answer. I suspect not (wontfix); but if it is possible, this bug can be re-opened as an enhancement request. Or a Backport from Cauldron to M8.

> Additionally, I would also ask you to assemble 's3cmd' for Mageia, but an
> inner voice tells me that I may be sent in an uncertain direction for my
> indescribable audacity. :)
Not at all. This would be a new bug 'new package request'; but since you are the author of the package, you would have to become the packager responsible for it.
See https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
Up to you.

Status: NEW => RESOLVED
Version: 8 => Cauldron
CC: (none) => lewyssmith
Resolution: (none) => FIXED

Comment 8 Alex Kotov 2021-12-27 20:44:25 CET
Thank you all for your cooperation. :)

Sincerely,
Alex

Note You need to log in before you can comment on or make changes to this bug.