Bug 1148538 - community-mysql has file conflicts with mariadb-server
Summary: community-mysql has file conflicts with mariadb-server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: community-mysql
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1149160
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-01 16:36 UTC by Daniel Berrangé
Modified: 2015-01-20 19:45 UTC (History)
8 users (show)

Fixed In Version: mariadb-10.0.14-6.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-01 16:50:21 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1183835 0 unspecified CLOSED Bad choice of provider for ambiguous "mvn(org.fusesource.hawtjni:hawtjni-runtime)" requirement: picks older package with... 2021-02-22 00:41:40 UTC

Internal Links: 1183835

Description Daniel Berrangé 2014-10-01 16:36:26 UTC
Description of problem:

Attempting to install mariadb-server with dnf results in a strange dep resolution whereby it tries to pull in part of mysql instead or mariadb, which conflicts at the file level

# dnf install -y mariadb-server
Dependencies resolved.
=============================================================================================================================================
 Package                                    Arch                       Version                              Repository                  Size
=============================================================================================================================================
Installing:
 community-mysql                            x86_64                     5.6.20-3.fc21                        fedora                     6.0 M
 community-mysql-common                     x86_64                     5.6.20-3.fc21                        fedora                      85 k
 mariadb-errmsg                             x86_64                     1:10.0.12-7.fc21                     fedora                     141 k
 mariadb-server                             x86_64                     1:10.0.12-7.fc21                     fedora                      13 M

Transaction Summary
=============================================================================================================================================
Install  4 Packages

Total size: 19 M
Total download size: 85 k
Installed size: 100 M
Downloading Packages:
[SKIPPED] mariadb-server-10.0.12-7.fc21.x86_64.rpm: Already downloaded                                                                      
[SKIPPED] mariadb-errmsg-10.0.12-7.fc21.x86_64.rpm: Already downloaded                                                                      
[SKIPPED] community-mysql-5.6.20-3.fc21.x86_64.rpm: Already downloaded                                                                      
(4/4): community-mysql-common-5.6.20-3.fc21.x86_64.rpm                                                        70 kB/s |  85 kB     00:01    
---------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                        8.7 MB/s |  19 MB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file /usr/share/man/man1/msql2mysql.1.gz conflicts between attempted installs of mariadb-server-1:10.0.12-7.fc21.x86_64 and community-mysql-5.6.20-3.fc21.x86_64
  file /usr/share/man/man1/mysqlbinlog.1.gz conflicts between attempted installs of mariadb-server-1:10.0.12-7.fc21.x86_64 and community-mysql-5.6.20-3.fc21.x86_64
  file /usr/share/man/man1/mysqlcheck.1.gz conflicts between attempted installs of mariadb-server-1:10.0.12-7.fc21.x86_64 and community-mysql-5.6.20-3.fc21.x86_64
  file /usr/share/man/man1/mysqlimport.1.gz conflicts between attempted installs of mariadb-server-1:10.0.12-7.fc21.x86_64 and community-mysql-5.6.20-3.fc21.x86_64

Error Summary
-------------


I had to explicitly specify 'mariadb' too, to get it pull the right deps:

# dnf install mariadb mariadb-server
Dependencies resolved.
=============================================================================================================================================
 Package                              Arch                         Version                                Repository                    Size
=============================================================================================================================================
Installing:
 mariadb                              x86_64                       1:10.0.12-7.fc21                       fedora                       9.8 M
 mariadb-errmsg                       x86_64                       1:10.0.12-7.fc21                       fedora                       141 k
 mariadb-server                       x86_64                       1:10.0.12-7.fc21                       fedora                        13 M

Transaction Summary
=============================================================================================================================================
Install  3 Packages

Total size: 23 M
Total download size: 9.8 M
Installed size: 118 M
Is this ok [y/N]: y
...


Oddly yum got it right straight away with just 'yum install mariadb-server', so seems like a dnf quirk.


Version-Release number of selected component (if applicable):
yum-3.4.3-153.fc21.noarch
dnf-0.6.1-1.fc21.noarch
hawkey-0.5.1-1.fc21.x86_64

Comment 1 Daniel Berrangé 2014-10-01 16:52:08 UTC
There seems to be something different going on with the virtual provides and choice between multiple options.

Both 'community-mysql-server' and 'mariadb-server' provide 'mysql-server'.

When asking to install 'mysql-server',  yum will prefer 'mariadb-server' but dnf is preferring 'community-mysql-server'.

Comment 2 Honza Silhan 2014-10-02 15:09:03 UTC
Thanks for the report. mariadb-server package requires mysql-compat-client. Both mariadb and community-mysql provides mysql-compat-client. Solver chooses the package that contains the same files as the package that required it. This deserves deeper look why solver doesn't see file conflicts.

Comment 3 Honza Silhan 2014-10-02 15:23:07 UTC
Files data are not contained in repository metadata so solver cannot know about file conflicts. This is packaging bug of community-mysql.

Comment 4 Daniel Berrangé 2014-10-02 15:28:11 UTC
This doesn't really answer the question about why 'dnf install mysql-server' chooses community-mysql-server while 'yum install mysql-server' chooses mariadb-server. File conflicts doesn't come into that part of the decision, so this still seems a bug in dnf, becuase it has different behaviour to yum, not a bug in the packaging.

Comment 5 Radek Holy 2014-10-03 10:00:48 UTC
DNF/libsolv simply uses different heuristics than YUM. I believe that if there are two packages providing the same thing, nobody can assume that his package will be preferred unless the preference is specified somehow.

Comment 6 Honza Horak 2014-10-03 11:34:30 UTC
Well, the conflicts between community-mysql and mariadb are expected, even though it should be possible to have client from community-mysql and server from mariadb -- this should be hopefully fixed by including msql2mysql man page in correct page.

Anyway, I've reported a bug for libsolv (BZ #1149160m not sure if it is correct component, but as I was told dnf or hawkey should not care about solving dependencies) that dnf behaves differently than yum (an generally incorrectly), even less rationally than yum (btw. yum describe the logic in [1], dnf does not document it at all, so we can definitely change it).

But, to be honest, I would like to see some better implementation than yum does it now, something very simple for cases where both provides satisfy all dependencies (i.e. if it is possible to install either of the provides and all dependencies are satisfied). I described it in the bug mentioned above like "the provide with greater NEVRA is chosen".

With that simple rule we could prioritize the default provide by defining higher epoch. Nothing complicated and it would allow us to prioritize mariadb over community-mysql very well.

[1] http://yum.baseurl.org/wiki/CompareProviders

Comment 7 Fedora Update System 2014-10-14 05:00:25 UTC
mariadb-10.0.14-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mariadb-10.0.14-6.fc21

Comment 8 Fedora Update System 2014-10-16 01:57:48 UTC
Package mariadb-10.0.14-6.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-10.0.14-6.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12832/mariadb-10.0.14-6.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-11-01 16:50:21 UTC
mariadb-10.0.14-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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