[MDEV-5055] apt-get considers 5.5.33a downgrade from 5.5.33 Created: 2013-09-23  Updated: 2014-10-19  Resolved: 2014-10-19

Status: Closed
Project: MariaDB Server
Component/s: Platform Debian
Affects Version/s: 5.5.33a
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: packaging

Issue Links:
Relates
relates to MDEV-5252 Deb installation issues due to versio... Closed

 Description   

(maybe it wasn't supposed to, need to check, but from dependencies it looks like it should).

apt-get install mariadb-server (from 5.3.33 repo)
works all right

switch to 5.5 repo,
apt-get install mariadb-server
says it's already on the newest version.

elenst@wheezy-64:~$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mariadb-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 422 not upgraded.
 
elenst@wheezy-64:~$ sudo apt-get install mariadb-server-5.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mariadb-server-5.5 is already the newest version.
mariadb-server-5.5 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 422 not upgraded.
 
elenst@wheezy-64:~$ sudo apt-get install mariadb-server-5.5=5.5.33a+maria-1~wheezy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  tinyca mariadb-test
The following packages will be REMOVED:
  mariadb-server
The following packages will be DOWNGRADED:
  mariadb-server-5.5
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 422 not upgraded.
Need to get 18.7 MB of archives.
After this operation, 27.6 kB disk space will be freed.
Do you want to continue [Y/n]? 

elenst@wheezy-64:~$ dpkg -l | grep -E "(maria|mysql)"
ii  libdbd-mysql-perl                     4.021-1+b1                         amd64        Perl5 database interface to the MySQL database
ii  libmariadbclient18                    5.5.33+maria-1~wheezy              amd64        MariaDB database client library
ii  libmysqlclient18                      5.5.33+maria-1~wheezy              amd64        Virtual package to satisfy external depends
ii  mariadb-client-5.5                    5.5.33+maria-1~wheezy              amd64        MariaDB database client binaries
ii  mariadb-client-core-5.5               5.5.33+maria-1~wheezy              amd64        MariaDB database core client binaries
ii  mariadb-common                        5.5.33+maria-1~wheezy              all          MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
ii  mariadb-server                        5.5.33+maria-1~wheezy              all          MariaDB database server (metapackage depending on the latest version)
ii  mariadb-server-5.5                    5.5.33+maria-1~wheezy              amd64        MariaDB database server binaries
ii  mariadb-server-core-5.5               5.5.33+maria-1~wheezy              amd64        MariaDB database core server files
ii  mysql-common                          5.5.28+dfsg-1                      all          MySQL database common files, e.g. /etc/mysql/my.cnf

elenst@wheezy-64:~$ apt-cache show mariadb-server
Package: mariadb-server
Status: install ok installed
Priority: optional
Section: database
Installed-Size: 27
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Architecture: all
Source: mariadb-5.5
Version: 5.5.33+maria-1~wheezy
Depends: mariadb-server-5.5 (= 5.5.33+maria-1~wheezy)
...
 
 
Package: mariadb-server
Source: mariadb-5.5
Version: 5.5.33a+maria-1~wheezy
Architecture: all
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Installed-Size: 27
Depends: mariadb-server-5.5 (= 5.5.33a+maria-1~wheezy)
Homepage: http://mariadb.org/
Priority: optional
Section: database
Filename: pool/main/m/mariadb-5.5/mariadb-server_5.5.33a+maria-1~wheezy_all.deb
Size: 2966
...
 
 
elenst@wheezy-64:~$ apt-cache show mariadb-server-5.5
Package: mariadb-server-5.5
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 64186
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Architecture: amd64
Source: mariadb-5.5
Version: 5.5.33+maria-1~wheezy
Replaces: libmariadbclient-dev (<< 5.5.0), libmariadbclient16 (<< 5.3.4), mariadb-server (<< 5.5.33+maria-1~wheezy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server (<< 5.5.33+maria-1~wheezy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Provides: mariadb-server, mysql-server, virtual-mysql-server
Depends: mariadb-client-5.5 (>= 5.5.33+maria-1~wheezy), libdbi-perl, perl (>= 5.6), libaio1 (>= 0.3.93), libc6 (>= 2.7), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.6), zlib1g (>= 1:1.2.0), debconf (>= 0.5) | debconf-2.0, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= 5.5.33+maria-1~wheezy)
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Recommends: libhtml-template-perl
Suggests: tinyca, mailx, mariadb-test
Conflicts: mariadb-server (<< 5.5.33+maria-1~wheezy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server (<< 5.5.33+maria-1~wheezy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
...
 
Package: mariadb-server-5.5
Source: mariadb-5.5
Version: 5.5.33a+maria-1~wheezy
Architecture: amd64
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Installed-Size: 64186
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Depends: mariadb-client-5.5 (>= 5.5.33a+maria-1~wheezy), libdbi-perl, perl (>= 5.6), libaio1 (>= 0.3.93), libc6 (>= 2.7), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.6), zlib1g (>= 1:1.2.0), debconf (>= 0.5) | debconf-2.0, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= 5.5.33a+maria-1~wheezy)
Recommends: libhtml-template-perl
Suggests: tinyca, mailx, mariadb-test
Conflicts: mariadb-server (<< 5.5.33a+maria-1~wheezy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server (<< 5.5.33a+maria-1~wheezy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Replaces: libmariadbclient-dev (<< 5.5.0), libmariadbclient16 (<< 5.3.4), mariadb-server (<< 5.5.33a+maria-1~wheezy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mysql-server (<< 5.5.33a+maria-1~wheezy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Provides: mariadb-server, mysql-server, virtual-mysql-server
Homepage: http://mariadb.org/
Priority: optional
Section: misc
Filename: pool/main/m/mariadb-5.5/mariadb-server-5.5_5.5.33a+maria-1~wheezy_amd64.deb
Size: 18654952
...



 Comments   
Comment by Matt Coleman [ 2013-11-07 ]

This is due to the sorting algorithm used by dpkg. From Debian Policy (http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version): "The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters and so that a tilde sorts before anything, even the end of a part." So, when APT compares the versions "5.5_5.5.33+maria-1~wheezy" and "5.5_5.5.33a+maria-1~wheezy", "5.5_5.5.33a+maria-1~wheezy" is considered earlier because the sort algorithm places "a" before "+".

Since the packages are named "mariadb-*", do we really need "+maria" in the version?

Comment by Elena Stepanova [ 2014-10-19 ]

So, it was a result of the trade-off we made in 5.5.31, when we renamed our packages to solve th eproblem with conflicting MariaDB 5.5.x / MySQL 5.5.x versions. We used to have mariadb-server-5.5_5.5.28-mariadb1~wheezy_..., and with 'a' it would become mariadb-server-5.5_5.5.28-mariadb-a1~wheezy_..., and it seemed to work.
Then we started naming them mariadb-server-5.5_5.5.33+maria-1~wheezy_..., and with 'a' it would become mariadb-server_5.5.33a+maria-1~wheezy_, and it didn't work on the reason Matt explained above.

I don't think we should rename packages again, as I'm sure we'll get into some unexpected trouble whichever naming scheme we choose; we just need to remember about the problem and next time we decide to re-release packages of the same version, come up with something better than mariadb-server_5.5.Xa+maria-1...

serg, FYI ^

With that, I'm closing the issue as 'Won't fix'.

Generated at Thu Feb 08 07:01:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.