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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              holyfoot Alexey Botchkov added a comment -
              Show
              holyfoot Alexey Botchkov added a comment - See here for the patch proposal. http://lists.askmonty.org/pipermail/commits/2013-February/004258.html
              Hide
              holyfoot Alexey Botchkov added a comment -

              BTW possible workaround is using aptitude. It always offers different solutions for a given conflict, including the desired one.

              Show
              holyfoot Alexey Botchkov added a comment - BTW possible workaround is using aptitude. It always offers different solutions for a given conflict, including the desired one.
              Hide
              elenst Elena Stepanova added a comment -

              I doubt that. We've had a reported issue with aptitude: MDEV-4079
              The workaround was the same as with apt, using an explicit version for libmysqlclient.

              Show
              elenst Elena Stepanova added a comment - I doubt that. We've had a reported issue with aptitude: MDEV-4079 The workaround was the same as with apt, using an explicit version for libmysqlclient.
              Hide
              holyfoot Alexey Botchkov added a comment -

              But aptitude has worked for me quite well.
              That reported issue complains about 'aptitude -y'.
              Started with that '-y' key it works just like 'apt-get' and doesn't look for any different solutions.

              Show
              holyfoot Alexey Botchkov added a comment - But aptitude has worked for me quite well. That reported issue complains about 'aptitude -y'. Started with that '-y' key it works just like 'apt-get' and doesn't look for any different solutions.
              Hide
              knielsen Kristian Nielsen added a comment -

              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
              higher by apt than 5.5.30+dfsg-XXX.

              This will work as long as we release new 5.5.Y versions before the
              corresponding MySQL release hits the Debian repo.

              Show
              knielsen Kristian Nielsen added a comment - 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 higher by apt than 5.5.30+dfsg-XXX. This will work as long as we release new 5.5.Y versions before the corresponding MySQL release hits the Debian repo.

                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