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

Attempt to remove non-existing mariadb-libs causes removal of entire MariaDB installation

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
    • 10.5, 10.6
    • Platform RedHat
    • None
    • RHEL/CentOS 7

    Description

      Courtesy of tturenko's tests


      RHEL 7 and CentOS 7 have a package called mariadb-libs in the default installation:

      mariadb-libs-5.5.56-2.el7.x86_64
      

      It used to cause troubles for our installation, so our packaging is now aware of it in the form of (at least)

        IF(RPM MATCHES "(rhel|centos)[67]")
          SET(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-compat")
          SET(CPACK_RPM_compat_PACKAGE_CONFLICTS "mariadb-libs < 1:10.1.0")
        ENDIF()
      

      However, it causes a weird effect, which is probably unexpected and likely undesired.

      Let's say I remove the package first, before installing any MariaDB packages. It removes easily and only pulls postfix along:

      [buildbot@centos74-amd64 ~]$ rpm -qa | grep mariadb-libs
      mariadb-libs-5.5.56-2.el7.x86_64
      [buildbot@centos74-amd64 ~]$ sudo yum remove -y mariadb-libs
      Loaded plugins: fastestmirror
      Resolving Dependencies
      --> Running transaction check
      ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be erased
      --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
      --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
      --> Running transaction check
      ---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
      --> Finished Dependency Resolution
       
      Dependencies Resolved
       
      =============================================================================================================================================================================================================================================
       Package                                                    Arch                                                 Version                                                       Repository                                               Size
      =============================================================================================================================================================================================================================================
      Removing:
       mariadb-libs                                               x86_64                                               1:5.5.56-2.el7                                                @anaconda                                               4.4 M
      Removing for dependencies:
       postfix                                                    x86_64                                               2:2.10.1-6.el7                                                @anaconda                                                12 M
       
      Transaction Summary
      =============================================================================================================================================================================================================================================
      Remove  1 Package (+1 Dependent package)
       
      Installed size: 17 M
      Downloading packages:
      Running transaction check
      Running transaction test
      Transaction test succeeded
      Running transaction
        Erasing    : 2:postfix-2.10.1-6.el7.x86_64                                                                                                                                                                                             1/2 
        Erasing    : 1:mariadb-libs-5.5.56-2.el7.x86_64                                                                                                                                                                                        2/2 
        Verifying  : 1:mariadb-libs-5.5.56-2.el7.x86_64                                                                                                                                                                                        1/2 
        Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                                                                                                                                                                             2/2 
       
      Removed:
        mariadb-libs.x86_64 1:5.5.56-2.el7                                                                                                                                                                                                         
       
      Dependency Removed:
        postfix.x86_64 2:2.10.1-6.el7                                                                                                                                                                                                              
       
      Complete!
      

      Then I install a bunch of MariaDB packages, they install all right.
      There is still no mariadb-libs of course.
      But if I try to remove it, instead yum removes our MariaDB-compat, which in turns pulls together the whole installed set:

      [buildbot@centos74-amd64 ~]$ rpm -qa | grep mariadb-libs
      [buildbot@centos74-amd64 ~]$ sudo yum remove -y mariadb-libs
      Loaded plugins: fastestmirror
      Resolving Dependencies
      --> Running transaction check
      ---> Package MariaDB-compat.x86_64 0:10.5.12-1.el7.centos will be erased
      --> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.5.12-1.el7.centos.x86_64
      --> Running transaction check
      ---> Package MariaDB-common.x86_64 0:10.5.12-1.el7.centos will be erased
      --> Processing Dependency: MariaDB-common for package: MariaDB-shared-10.5.12-1.el7.centos.x86_64
      --> Processing Dependency: MariaDB-common for package: MariaDB-server-10.5.12-1.el7.centos.x86_64
      --> Processing Dependency: MariaDB-common for package: MariaDB-client-10.5.12-1.el7.centos.x86_64
      --> Processing Dependency: MariaDB-common for package: MariaDB-devel-10.5.12-1.el7.centos.x86_64
      --> Processing Dependency: MariaDB-common for package: MariaDB-backup-10.5.12-1.el7.centos.x86_64
      ...
      

      I only checked 10.5 and 10.6, but the packaging logic looks the same everywhere.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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