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

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 5.5.28
    • 5.5.31
    • None

    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

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

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

            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.

            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.

            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.

            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.

            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.

            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.

            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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.