[MDEV-747] LP:857995 - MariaDB packages don't obsolete MySQL rpms Created: 2011-09-24 Updated: 2020-09-08 Resolved: 2012-10-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.28 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jascha Lee (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Since the files contained in the MariaDB rpms conflict with those in the MySQL rpms, this should be reflected in the MariaDB spec files. This will enable yum to handle this at the package level, rather than find out when it tries to install the files. Ideally, each MariaDB package would "Obsolete" the corresponding MySQL package. This should allow the MariaDB package to be yum/rpm installed on a system with MySQL installed, with yum/rpm automatically removing the MySQL rpm. This is accomplished by adding an "Obsoletes : " tag to the rpm spec file and listing the package to be replaced in the same way as a "Requires :" tag. |
| Comments |
| Comment by Colin Charles [ 2011-11-12 ] |
|
Re: MariaDB packages don't obsolete MySQL rpms We do provide the Obsoletes: tag in RPM. Where are you getting this from? mysql, mysql-server, etc. are obsoleted. Please provide where you got the RPM from and why yum didn't handle it. Thanks |
| Comment by Jascha Lee (Inactive) [ 2011-11-17 ] |
|
Re: [Bug 857995] Re: MariaDB packages don't obsolete MySQL rpms MariaDB-shared-5.2.7-101.el5.x86_64 obsoletes mysql-shared could the case difference cause a problem? It could also be just a shortcoming of yum/rpm. In any case, I had to first remove the MySQL packages rather than having them removed automatically when installing MariaDB. Thanks, On Nov 12, 2011, at 7:04 AM, Colin Charles wrote: > Hi! |
| Comment by Kolbe Kegel (Inactive) [ 2012-09-28 ] |
|
Re: MariaDB packages don't obsolete MySQL rpms Many folks set up their own repository for use with yum and they put MariaDB packages into that repository to ease rollout to their various hosts. The side-effect of building the MariaDB-Server RPM with these Obsoletes is that it becomes impossible to install MySQL packages that might also be present in the repository. I am not referring here to someone trying to install MySQL and MariaDB simultaneously on the same host; rather, I am referring to someone wanting to be able to select whether to install MySQL or MariaDB, RPMs for both of which are present in their yum repository. [root@mariadb53 ~]# yum install mysql-server mysql
This illustrates that an attempt to install (upgrade is also affected!) MySQL from the user's own repository results in MariaDB automatically being selected for installation instead. You may note, here, that MariaDB-Server obsoletes "mysql", which is very strange. In Enterprise Linux, "mysql" is the client package ("mysql.x86_64 : MySQL client programs and shared libraries"). By building the MariaDB-Server to Obsolete "mysql", an attempt to install the MySQL client will result in the MariaDB Server being installed! That is, surely, not intended or desirable... So, I have two concerns here: 1) Why does MariaDB "Obsolete" any of these other MySQL packages? I had trouble finding good guidance about what "Obsolete" is used for, but I did find http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependencies.html#RPM_Guide-Dependencies-obsoletes which explains it in this way: The RPM system supports one more type of dependency, called obsoletes. This refers to a capability that a package provides that makes another capability obsolete. For example, a new version of the perl interpreter may make an older version obsolete. In most cases, the obsoletes dependency should be used when the name of a package changes. For example, the apache Web server package became the httpd package. You would expect the new package, httpd, to obsolete the old package name, apache. MariaDB-Server is certainly not a renamed version of MySQL, nor does it logically make MySQL "obsolete". The two certainly conflict, but it does not make sense (except perhaps in a political sense!) to say that MariaDB makes MySQL "obsolete". The first "Obsolete" in the spec is to make "MariaDB" obsoleted by "MariaDB-Server". If there is some previous RPM of MariaDB that was called only "MariaDB" and contained mysqld, it does make sense to leave that one in, as this is a case of the package being renamed from "MariaDB" to "MariaDB-Server". I am interested to know the logic behind putting these other Obsolete lines into the spec. What does it give that you don't get with Conflicts? 2) The other issue, beyond whether it is useful to have any Obsoletes for MySQL in the MariaDB RPM, is why MariaDB should Obsolete "mysql". This definitely does not make sense, as "mysql" is the name of the package that contains the MySQL client and shared libraries; MariaDB-Server cannot in any sense make obsolete the MySQL client... |
| Comment by Jascha Lee (Inactive) [ 2012-09-28 ] |
|
Re: MariaDB packages don't obsolete MySQL rpms If there are Obsoletes in the packages they should be consistent. So maybe remove them all? As to your question about the mysql Obsoletes. These refer to "providers", not necessarily package names: |
| Comment by Rasmus Johansson (Inactive) [ 2012-09-28 ] |
|
Launchpad bug id: 857995 |