[MDEV-3882] .deb upgrade from mysql to mariadb fails due to apt-get considering it a downgrade Created: 2012-11-25 Updated: 2013-11-06 Resolved: 2013-04-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.28 |
| Fix Version/s: | 5.5.31 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | packaging | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
On Debian wheezy upgrade from mysql->mariadb fails like this:
The root cause is this:
I believe the problem is that apt-get considers 5.5.28+dfsg-1 a newer version A work-around is to ask for the "downgrade" explicitly:
This problem becomes more of an issue due to Oracle keeping security patches One fix may be to re-write the -mariadb1~wheezy suffix to something that This however does not help if the distro introduces eg. mysql 5.5.30 while the |
| Comments |
| Comment by Kristian Nielsen [ 2012-11-27 ] |
|
It appears this problem is even worse. There was a report that issuing a general upgrade can cause apt-get to want to So a user not being careful to notice this fact could end up accidentally |
| Comment by Kristian Nielsen [ 2012-11-29 ] |
|
See also this knowledgebase entry: |
| Comment by Martin Burger [ 2013-01-23 ] |
|
I wanted to update both libmysqlclient18 and mysql-common on a machine running Precise Pangolin (12.04 LTS) and run into the same issue, I think: The following packages will be upgraded: 2 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Remove the following packages: Unfortunately, aptitude wants to remove MariaDB. apt-cache policy libmysqlclient18 shows the following: libmysqlclient18:
|
| Comment by Dougie Lawson [ 2013-01-24 ] |
|
I got this from apt-get dist-upgrade Reading package lists... Done So I've used I've switched to using apt-get upgrade until this is resolved. |
| Comment by Elena Stepanova [ 2013-02-01 ] |
|
Even after 5.5.29 release, we have a similar problem when someone attempts to replace Percona server 5.5.29 with MariaDB 5.5.29: The following packages have unmet dependencies: The same workaround ( apt-get install libmysqlclient18=5.5.29-mariadb1~precise ) |
| Comment by Jean Weisbuch [ 2013-02-02 ] |
|
Its "normal" that there might be conflicts for users having both MariaDB and Percona repositories, as both are providing drop-in replacement for the MySQL that is shipped with the distribution and by default every repositories have the same priority, so if two of them have the same package, it will try to install the one that seems to be the latest. You can choose that one of the repository has an higher priority (either for * or for a specified package), for example you can add these lines on /etc/apt/preferences or on a file on /etc/apt/preferences.d/ (in that example, mirror3.layerjet.com is the Maria repository used) : Package: * Or if you want for example to have percona-toolkit from the Percona repo but libmysqlclient18 from the Maria one : Package: libmysqlclient18 You shouldnt have to do this when replacing the official distro packages but as noted, now that official packages might get upstream upgrades, Maria should find a way to identify the packages as having an higher version number (the corresponding documentation, if i am right is that one : http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version). |
| Comment by Elena Stepanova [ 2013-02-02 ] |
|
In regard to my Percona comment, it's not about having both repositories configured at once, the scenario is different there. The problem is if you once had the Percona repository and now have the Percona's libmysqlclient installed, you can't install MariaDB even if you remove Percona repository: wording of the error upon installation is too vague, actually the Percona's libmysqlclient is already there, and MariaDB currently doesn't replace it. |
| Comment by Alexey Botchkov [ 2013-02-05 ] |
|
See here for the patch proposal. |
| Comment by Alexey Botchkov [ 2013-02-05 ] |
|
BTW possible workaround is using aptitude. It always offers different solutions for a given conflict, including the desired one. |
| Comment by Elena Stepanova [ 2013-02-05 ] |
|
I doubt that. We've had a reported issue with aptitude: |
| Comment by Alexey Botchkov [ 2013-02-06 ] |
|
But aptitude has worked for me quite well. |
| Comment by Kristian Nielsen [ 2013-04-16 ] |
|
I've pushed a partial fix for this. Hopefully it will be enough. I changed the version to eg. 5.5.30+maria-1~wheezy. This will be considered This will work as long as we release new 5.5.Y versions before the |