Bug #96492 Debian 10 purges mysql-apt-config (with command aptitude search '~o')
Submitted: 9 Aug 2019 16:32 Modified: 19 Aug 2019 21:50
Reporter: Alessandro Serena Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Package Repos Severity:S2 (Serious)
Version:5.7.27 OS:Debian
Assigned to: MySQL Verification Team CPU Architecture:Any

[9 Aug 2019 16:32] Alessandro Serena
Description:
I upgraded Debian 9 Stretch to Debian 10 Buster, and after purging obsolete packages, MySQL goes away.

How to repeat:
I modified /etc/apt/sources.list.d/mysql.list replacing "stretch" with "buster".

I update and upgrade, finding new version of MySQL.

When I launch command "aptitude search '~o'" it shows:

i   mysql-apt-config                                               - Auto configuration for MySQL APT Repo. 

So, when I launch "aptitude purge ~o" it removes mysql-apt-config and tell me:

There are 4 newly obsolete packages: mysql-client, mysql-community-client, mysql-community-server, mysql-server

So when I launch again "aptitude search '~o'", it removes them.
[9 Aug 2019 16:42] Alessandro Serena
Note: I'm using Debian 10, with MySQL 5.7.27.
[12 Aug 2019 5:48] Lars Tangvald
Hi,

Did you install MySQL using the "mysql-server" meta package, or just mysql-community-server?

I wonder if this is because in Debian 9, MySQL was removed from native packaging, but they kept "mysql-server" as a transitionary package (versioned as 5.5.999, so our repo packages would be used instead), pointing to MariaDB. In Buster, this package has been removed, which would mark it as obsolete.
[12 Aug 2019 10:27] Alessandro Serena
Hi Lars,

thank you for your help.

I installed MySQL 5.6 in date 8 March 2016 (with Debian 8), using this file: dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb

In date 12 May 2016 I upgrade to 5.7, using this file: dev.mysql.com/get/mysql-apt-config_0.7.2-1_all.deb

At June 2017 I upgrade to Debian 9, with no problems.

At August 2019 I upgrade to Debian 10, and the problem appear.

I hope this info can help you, let me know if you need more info.

One thing: to upgrade MySQL, I change the word "jessie" to "buster" in /etc/apt/sources.list.d/mysql.list, so it can receive upgrades. I hope this is correct.

Thank you again,

Alessandro
[12 Aug 2019 10:51] Alessandro Serena
Another thing, in this case, could you tell me the correct procedure to resolve the problem?

Should I remove the actual MySQL, and install again? Or is there a faster solution?

Thank you again,

Alessandro
[14 Aug 2019 5:19] MySQL Verification Team
Hi Alessandro,

I believe you should use the latest mysql-apt-config_0.8.13-1_all.deb for start. Just like you already used mysql-apt-config_0.6.0-1_all.deb and mysql-apt-config_0.7.2-1_all.deb.

Now, if aptitude purge removes the mysql-apt-config that's cause no other package links to it as dependency. That's why you want to mark it "manual":

sudo apt-mark manual mysql-apt-config

that should solve the problem.

kind regards
Bogdan
[14 Aug 2019 20:58] Alessandro Serena
Hi Bogdan,

thank you for your help.

After lauch commands:
wget dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
dpkg -i mysql-apt-config_0.8.13-1_all.deb

My file /etc/apt/sources.list.d/mysql.list is this:

### 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/ jessie mysql-apt-config
deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7
deb http://repo.mysql.com/apt/debian/ jessie mysql-tools
#deb http://repo.mysql.com/apt/debian/ jessie mysql-tools-preview
deb-src http://repo.mysql.com/apt/debian/ jessie mysql-5.7

My question is: why is there "jessie" instead of "buster"? And, is it correct to manual replace "jessie" with "buster"? Or I must use this file?

Thank you,

Alessandro
[19 Aug 2019 10:58] MySQL Verification Team
Hi,

if you look at 
http://repo.mysql.com/apt/debian/conf/distributions
http://repo.mysql.com/apt/debian/dists/

all distros are there

not sure why reconfigure uses wrong one on your computer. changing that file manually will make everything work but reconfigure will probbly return old values. I'm pretty sure it has nothing to do with us and that it's some type of distro tools bug. Was that server upgraded or that's the original installation?

all best
Bogdan
[19 Aug 2019 11:13] Alessandro Serena
Hi Bogdan,

the original installation was Debian 8 Jessie, then I upgraded to Debian 9 Stretch, and now to Debian 10 Buster.

If I launch mysql-apt-config (or reconfigure) it always use "jessie" instead of "buster". But if you tell me that I can safely replace manually "jessie" with "buster", I can do that.

And then, I can apt-mark manual mysql-apt-config, so it remain there.

Or should I completly remove MySQL, and reinstall again? If possible, I prefer to avoid this option, and simply replace the word "jessie".

Thank you!
[19 Aug 2019 14:52] MySQL Verification Team
Hi,

This def looks like it has nothing to do with MySQL :D so setting this as not a bug.

Yes, it is safe to change the word only so that proper packages are used.

After you do the upgrade of mysql next time, check the list file if it remained unchanged.

all best
Bogdan
[19 Aug 2019 15:23] Alessandro Serena
Ok for mysql-apt-config, but there is still the problem with the purge.

I used the command "apt-mark manual mysql-apt-config", as you told me, but if I launch "aptitude purge ~o" it still tells me:
The following packages will be REMOVED:  
  mysql-apt-config{p} 
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 35.8 kB will be freed.
Do you want to continue? [Y/n/?]

If can be useful, if I launch aptitude search '~o', it tells me:
i   mysql-apt-config                                                    - Auto configuration for MySQL APT Repo.  

So I lauch again "apt-mark manual mysql-apt-config", and it tells me:
mysql-apt-config was already set to manually installed.

Thank you,

Alessandro
[19 Aug 2019 16:23] MySQL Verification Team
That looks like a debian bug to me as

https://manpages.debian.org/buster/apt/apt-mark.8.en.html

[quote]
manual is used to mark a package as being manually installed, which will prevent the package from being automatically removed if no other packages depend on it.
[/quote]

so if it's marked as manual and debian is trying to remove it as obsolete, I'd say that's a debian bug :(
[19 Aug 2019 21:50] Alessandro Serena
Hi,

I found this, relative to aptitude purge ~o:

"They are obsolete because 1) they are not in any repo that is in your sources.list or 2) they are packages you installed locally using dpkg that again are not in the repos in your sources.list."

Following your instructions, I installed mysql-apt-config using dpkg, so this is the reason it is considered "local or obsolete".

Maybe is there a way to insert mysql-apt-config in sources.list?