Bug #75485 5.6.22 to 5.6.23 apt-get upgrade not replacing packages from apt repo
Submitted: 13 Jan 2015 4:22 Modified: 1 Apr 2015 20:44
Reporter: Ramana Yeruva Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Package Repos and Docker Images Severity:S3 (Non-critical)
Version:5.6.23 OS:Any
Assigned to: CPU Architecture:Any

[13 Jan 2015 4:22] Ramana Yeruva
Description:
install http://dev.mysql.com/get/mysql-apt-config_0.3.2-1debian7_all.deb from public repository and select 5.6 from version dialog
update apt repo
install mysql-server which should install 5.6.22 packages from repo
now remove mysql-apt-config
install http://clustra.no.oracle.com/~bteam/my/apt-config-pkgs/qa/mysql-apt-config_0.3.2-1debian7_... which has 5.6.23 packages linked
update apt repo
execute apt-get upgrade<--observe 5.6.22 packages not replaced with 5.6.23 packages
execute apt-get dist-upgrade<--this option replacing 5.6.22 packages with 5.6.23 packages

How to repeat:
export http_proxy=http://www-proxy.us.oracle.com
wget http://dev.mysql.com/get/mysql-apt-config_0.3.2-1debian7_all.deb
dpkg -i mysql-apt-config_0.3.2-1debian7_all.deb<--select 5.6
cat /etc/apt/sources.list.d/mysql.list
apt-get remove --purge mysql-apt-config
dpkg -r mysql-apt-config
wget http://clustra.no.oracle.com/~bteam/my/apt-config-pkgs/qa/mysql-apt-config_0.3.2-1debian7_...
dpkg -i mysql-apt-config_0.3.2-1debian7_all.deb
apt-get update
cat /etc/apt/sources.list.d/mysql.list
apt-get upgrade<--observer packages not replaced here
apt-get dist-upgrade<--packages are replaced with this step
[13 Jan 2015 4:24] Ramana Yeruva
Posted by developer:
 
Detailed log:
lroot@viking17:~/Ramana/public# export http_proxy=http://www-proxy.us.oracle.com
lroot@viking17:~/Ramana/public# wget http://dev.mysql.com/get/mysql-apt-config_0.3.2-1debian7_all.deb
--2015-01-13 05:01:31--  http://dev.mysql.com/get/mysql-apt-config_0.3.2-1debian7_all.deb
Resolving www-proxy.us.oracle.com (www-proxy.us.oracle.com)... 148.87.19.20
Connecting to www-proxy.us.oracle.com (www-proxy.us.oracle.com)|148.87.19.20|:80... connected.
Proxy request sent, awaiting response... 302 Found
Location: http://repo.mysql.com/mysql-apt-config_0.3.2-1debian7_all.deb [following]
--2015-01-13 05:01:31--  http://repo.mysql.com/mysql-apt-config_0.3.2-1debian7_all.deb
Reusing existing connection to www-proxy.us.oracle.com:80.
Proxy request sent, awaiting response... 200 OK
Length: 18256 (18K) [application/x-debian-package]
Saving to: `mysql-apt-config_0.3.2-1debian7_all.deb'

100%[=================================================================================================================================>] 18,256      45.0K/s   in 0.4s    

2015-01-13 05:01:33 (45.0 KB/s) - `mysql-apt-config_0.3.2-1debian7_all.deb' saved [18256/18256]

lroot@viking17:~/Ramana/public# dpkg -i mysql-apt-config_0.3.2-1debian7_all.deb 
Selecting previously unselected package mysql-apt-config.
(Reading database ... 172755 files and directories currently installed.)
Unpacking mysql-apt-config (from mysql-apt-config_0.3.2-1debian7_all.deb) ...
Setting up mysql-apt-config (0.3.2-1debian7) ...
OK
lroot@viking17:~/Ramana/public# cat /etc/apt/sources.list.d/mysql.list 
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/debian/ wheezy mysql-apt-config
deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
# deb http://repo.mysql.com/apt/debian/ wheezy connector-python-2.0

deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
lroot@viking17:~/Ramana/public# apt-get update
Get:1 http://mirror.bytemark.co.uk wheezy-backports Release.gpg [836 B]
Get:2 http://mirror.bytemark.co.uk wheezy-backports Release [147 kB]                                                                         
Hit http://mirror.bytemark.co.uk wheezy-backports/main amd64 Packages/DiffIndex                                   
Get:3 http://repo.mysql.com wheezy Release.gpg [173 B]
Hit http://mirror.bytemark.co.uk wheezy-backports/main Translation-en/DiffIndex
Get:4 http://repo.mysql.com wheezy Release [9,670 B]
Hit http://fimafeng01.no.oracle.com wheezy Release.gpg
Get:5 http://repo.mysql.com wheezy/mysql-5.6 Sources [849 B]
Get:6 http://repo.mysql.com wheezy/mysql-apt-config amd64 Packages [550 B]
Get:7 http://fimafeng01.no.oracle.com wheezy-updates Release.gpg [836 B]
Get:8 http://repo.mysql.com wheezy/mysql-5.6 amd64 Packages [2,999 B]
Hit http://fimafeng01.no.oracle.com wheezy Release   
Get:9 http://fimafeng01.no.oracle.com wheezy-updates Release [124 kB] 
Hit http://fimafeng01.no.oracle.com wheezy/main Sources 
Hit http://fimafeng01.no.oracle.com wheezy/main amd64 Packages                                                                                                            
Hit http://fimafeng01.no.oracle.com wheezy/main Translation-en                                                                                                            
Get:10 http://fimafeng01.no.oracle.com wheezy-updates/main Sources [1,805 B]                                                                                              
Ign http://repo.mysql.com wheezy/mysql-5.6 Translation-en_US                                                                                                              
Hit http://fimafeng01.no.oracle.com wheezy-updates/main amd64 Packages/DiffIndex                                                                                          
Hit http://fimafeng01.no.oracle.com wheezy-updates/main Translation-en/DiffIndex                                                                                          
Ign http://repo.mysql.com wheezy/mysql-5.6 Translation-en                                                                                                                 
Ign http://repo.mysql.com wheezy/mysql-apt-config Translation-en_US                                                                                                       
Ign http://repo.mysql.com wheezy/mysql-apt-config Translation-en                                                                                                          
Fetched 288 kB in 22s (12.8 kB/s)                                                                                                                                         
Reading package lists... Done
lroot@viking17:~/Ramana/public# apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  mysql-common mysql-community-client mysql-community-server
The following NEW packages will be installed:
  mysql-common mysql-community-client mysql-community-server mysql-server
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.3 MB of archives.
After this operation, 164 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://repo.mysql.com/apt/debian/ wheezy/mysql-5.6 mysql-common amd64 5.6.22-1debian7 [718 kB]
Get:2 http://repo.mysql.com/apt/debian/ wheezy/mysql-5.6 mysql-community-server amd64 5.6.22-1debian7 [27.9 MB]
Get:3 http://repo.mysql.com/apt/debian/ wheezy/mysql-5.6 mysql-community-client amd64 5.6.22-1debian7 [21.7 MB]                                                           
Get:4 http://repo.mysql.com/apt/debian/ wheezy/mysql-5.6 mysql-server amd64 5.6.22-1debian7 [10.8 kB]                                                                     
Fetched 50.3 MB in 3min 38s (230 kB/s)                                                                                                                                    
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 172762 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.6.22-1debian7_amd64.deb) ...
Selecting previously unselected package mysql-community-server.
Unpacking mysql-community-server (from .../mysql-community-server_5.6.22-1debian7_amd64.deb) ...
Selecting previously unselected package mysql-community-client.
Unpacking mysql-community-client (from .../mysql-community-client_5.6.22-1debian7_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.6.22-1debian7_amd64.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.6.22-1debian7) ...
Setting up mysql-community-server (5.6.22-1debian7) ...
insserv: warning: script 'K01bigbrother' missing LSB tags and overrides
insserv: warning: script 'bigbrother' missing LSB tags and overrides
su: User not known to the underlying authentication module
......
[info] MySQL Community Server 5.6.22 is started.
Setting up mysql-community-client (5.6.22-1debian7) ...
Setting up mysql-server (5.6.22-1debian7) ...
lroot@viking17:~/Ramana/public# apt-get remove --purge mysql-apt-config 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  mysql-apt-config*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 35.8 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 173001 files and directories currently installed.)
Removing mysql-apt-config ...
Purging configuration files for mysql-apt-config ...
lroot@viking17:~/Ramana/public# dpkg -r mysql-apt-config
dpkg: warning: ignoring request to remove mysql-apt-config which isn't installed
lroot@viking17:~/Ramana/public# apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
lroot@viking17:~/Ramana/public# apt-get autoclean 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Del mysql-community-server 5.6.22-1debian7 [27.9 MB]
Del mysql-community-client 5.6.22-1debian7 [21.7 MB]
Del mysql-common 5.6.22-1debian7 [718 kB]
Del mysql-server 5.6.22-1debian7 [10.8 kB]
lroot@viking17:~/Ramana/internal# dpkg -i mysql-apt-config_0.3.2-1debian7_all.deb 
Selecting previously unselected package mysql-apt-config.
(Reading database ... 172996 files and directories currently installed.)
Unpacking mysql-apt-config (from mysql-apt-config_0.3.2-1debian7_all.deb) ...
Setting up mysql-apt-config (0.3.2-1debian7) ...
OK
lroot@viking17:~/Ramana/internal# apt-get update
Get:1 http://clustra.no.oracle.com wheezy Release.gpg [173 B]
Get:2 http://clustra.no.oracle.com wheezy Release [9,652 B]                                                  
Get:3 http://clustra.no.oracle.com wheezy/mysql-5.6 Sources [848 B]                                        
Get:4 http://clustra.no.oracle.com wheezy/mysql-apt-config amd64 Packages [552 B]                                            
Hit http://mirror.bytemark.co.uk wheezy-backports Release.gpg                                           
Get:5 http://clustra.no.oracle.com wheezy/mysql-5.6 amd64 Packages [2,724 B]
Hit http://mirror.bytemark.co.uk wheezy-backports Release                                   
Hit http://fimafeng01.no.oracle.com wheezy Release.gpg                
Ign http://clustra.no.oracle.com wheezy/mysql-5.6 Translation-en_US   
Ign http://clustra.no.oracle.com wheezy/mysql-5.6 Translation-en      
Hit http://mirror.bytemark.co.uk wheezy-backports/main amd64 Packages/DiffIndex
Ign http://clustra.no.oracle.com wheezy/mysql-apt-config Translation-en_US
Ign http://clustra.no.oracle.com wheezy/mysql-apt-config Translation-en
Hit http://mirror.bytemark.co.uk wheezy-backports/main Translation-en/DiffIndex
Hit http://fimafeng01.no.oracle.com wheezy-updates Release.gpg
Hit http://fimafeng01.no.oracle.com wheezy Release
Hit http://fimafeng01.no.oracle.com wheezy-updates Release
Hit http://fimafeng01.no.oracle.com wheezy/main Sources
Hit http://fimafeng01.no.oracle.com wheezy/main amd64 Packages
Hit http://fimafeng01.no.oracle.com wheezy/main Translation-en
Hit http://fimafeng01.no.oracle.com wheezy-updates/main Sources
Hit http://fimafeng01.no.oracle.com wheezy-updates/main amd64 Packages/DiffIndex                                                                                          
Hit http://fimafeng01.no.oracle.com wheezy-updates/main Translation-en/DiffIndex                                                                                          
Fetched 13.9 kB in 7s (1,768 B/s)                                                                                                                                         
Reading package lists... Done
lroot@viking17:~/Ramana/internal# cat /etc/apt/sources.list.d/mysql.list 
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy mysql-apt-config
deb http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy mysql-5.6
# deb http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy connector-python-2.0

deb-src http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy mysql-5.6
*************************problem here************
lroot@viking17:~/Ramana/internal# apt-get upgrade<--upgrade is not happening
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  mysql-common mysql-community-client mysql-community-server mysql-server
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
*************************problem here************
lroot@viking17:~/Ramana/internal# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  mysql-client
The following packages will be upgraded:
  mysql-common mysql-community-client mysql-community-server mysql-server
4 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.4 MB of archives.
After this operation, 228 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy/mysql-5.6 mysql-community-client amd64 5.6.23-1debian7 [21.7 MB]
Get:2 http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy/mysql-5.6 mysql-server amd64 5.6.23-1debian7 [11.6 kB]
Get:3 http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy/mysql-5.6 mysql-community-server amd64 5.6.23-1debian7 [27.9 MB]
Get:4 http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy/mysql-5.6 mysql-common amd64 5.6.23-1debian7 [706 kB]
Get:5 http://clustra.no.oracle.com/~bteam/my/apt/debian/ wheezy/mysql-5.6 mysql-client amd64 5.6.23-1debian7 [11.6 kB]
Fetched 50.4 MB in 1s (30.8 MB/s)   
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 173003 files and directories currently installed.)
Preparing to replace mysql-community-client 5.6.22-1debian7 (using .../mysql-community-client_5.6.23-1debian7_amd64.deb) ...
Unpacking replacement mysql-community-client ...
Preparing to replace mysql-server 5.6.22-1debian7 (using .../mysql-server_5.6.23-1debian7_amd64.deb) ...
Unpacking replacement mysql-server ...
Preparing to replace mysql-community-server 5.6.22-1debian7 (using .../mysql-community-server_5.6.23-1debian7_amd64.deb) ...
...
[info] MySQL Community Server 5.6.22 is stopped.
.
Unpacking replacement mysql-community-server ...
Preparing to replace mysql-common 5.6.22-1debian7 (using .../mysql-common_5.6.23-1debian7_amd64.deb) ...
Unpacking replacement mysql-common ...
Selecting previously unselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.6.23-1debian7_amd64.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.6.23-1debian7) ...
Setting up mysql-community-client (5.6.23-1debian7) ...
Setting up mysql-community-server (5.6.23-1debian7) ...
Installing new version of config file /etc/init.d/mysql ...
insserv: warning: script 'K01bigbrother' missing LSB tags and overrides
insserv: warning: script 'bigbrother' missing LSB tags and overrides
su: User not known to the underlying authentication module
......
[info] MySQL Community Server 5.6.23 is started.
Setting up mysql-server (5.6.23-1debian7) ...
Setting up mysql-client (5.6.23-1debian7) ...
[13 Jan 2015 4:26] Ramana Yeruva
Posted by developer:
 
***********Attaching discussion from Akhil***************

Hi Ramana,

I looked into the problem with apt-get upgrade and found that
mysql-community-server now recommends mysql-client which was not the
case with 5.6.22. This new recommendation was added after 5.6.22 to
solve the problem where user installs only client packages and then
attempts an upgrade which does not work smoothly. apt-get does not allow
upgrading a package which is causing installation of new package that is
not already installed.

When you install mysql-server=5.6.22 then mysql-client=5.6.22 is not
installed and only mysql-community-client=5.6.22 is installed. When you
run apt-get upgrade then mysql-server=5.6.23 recommends
mysql-client=5.6.23 that in turn depends on
mysql-community-client=5.6.23. This an additional package
msyql-client=5.6.23 needs to be installed. This is not supported with
apt-get upgrade. This is a one time problem and once user move to 5.6.23
then there will be no problem until the dependencies change again.

Right now, to move from 5.6.22 to 5.6.23 using apt-get upgrade the users
should either first manually install msyql-client using "apt-get install
mysql-client" or directly run "apt-get dist-upgrade".

Regards,
Akhil
[13 Jan 2015 4:31] Ramana Yeruva
Posted by developer:
 
This problem is not exists with 5.6.22 packages ie upgrade from 5.6.21 to 5.6.22 scenario
[1 Apr 2015 20:44] Paul Dubois
Noted in 5.6.22 changelog.

On Debian, apt-get upgrade did not replace some packages from the
repository. The workaround is to first manually install mysql-client
by running apt-get install mysql-client or directly run apt-get
dist-upgrade.