Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3882

.deb upgrade from mysql to mariadb fails due to apt-get considering it a downgrade

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.28
    • Fix Version/s: 5.5.31
    • Component/s: None
    • Labels:

      Description

      On Debian wheezy upgrade from mysql->mariadb fails like this:

      # apt-get install mariadb-server-5.5
      
      The following packages have unmet dependencies:
       mariadb-server-5.5 : Depends: mariadb-client-5.5 (>= 5.5.28-mariadb1~wheezy) but it is not going to be installed
                            Depends: mariadb-server-core-5.5 (>= 5.5.28-mariadb1~wheezy) but it is not going to be installed
      

      The root cause is this:

      # apt-get install libmariadbclient18                                                                                 ~
       libmariadbclient18 : Depends: libmysqlclient18 (= 5.5.28-mariadb1~wheezy) but 5.5.28+dfsg-1 is to be instahlled
      

      I believe the problem is that apt-get considers 5.5.28+dfsg-1 a newer version
      than 5.5.28-mariadb1~wheezy, and it will by default not do a downgrade to
      satisfy a dependency.

      A work-around is to ask for the "downgrade" explicitly:

      # apt-get install mariadb-server-5.5 libmysqlclient18=5.5.28-mariadb1~wheezy
      

      This problem becomes more of an issue due to Oracle keeping security patches
      secrect. This forces distros to upgrade to latest upstream version in released
      distros, which means we will more often get a newer mysql version on top of an
      earlier mariadb version, causing this issue.

      One fix may be to re-write the -mariadb1~wheezy suffix to something that
      apt-get considers newer than +dfsg-1, then apt-get will automatically install
      the replacement package as it does not consider it a downgrade.

      This however does not help if the distro introduces eg. mysql 5.5.30 while the
      mariadb repositories still have only 5.5.29 - then it will still be considered
      a downgrade.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                4 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d