Hi,
I've just made an upgrade from one month old sid to sid.
And I've had an install issue with "mariadb-server".
I've succeeded installing all packages save mariadb-server.
I show here what happens when trying to install mariadb-server.

(Note I did several reboot, part of it to be sure the bug wouldn't just vanish 
all by itself,
part of it because of the messy plasmashell freeze which I have the privilege 
to enjoy
so often.)

There are several parts with =========== as delimiter, so feel free to skip 
lengthy
outputs.

# apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  linux-image-4.8.0-2-amd64
Use 'apt autoremove' to remove it.
The following packages will be upgraded:
  mariadb-server-10.1 mariadb-server-core-10.1
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/10.4 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 179704 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.1_10.1.22-4_amd64.deb ...
3174
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
3174
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mariadb-
server-10.1_10.1.22-4_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
dpkg: considering deconfiguration of mariadb-server-10.1, which would be 
broken by installation of mariadb-server-core-10.1 ...
dpkg: yes, will deconfigure mariadb-server-10.1 (broken by mariadb-server-
core-10.1)
Preparing to unpack .../mariadb-server-core-10.1_10.1.22-4_amd64.deb ...
De-configuring mariadb-server-10.1 (10.1.22-3) ...
3174
There is a MySQL server running, but we failed in our attempts to stop it.      
                                                                                
                             
Stop it yourself and try again!                                                 
                                                                                
                             
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-
core-10.1_10.1.22-4_amd64.deb (--unpack):                                       
                                       
 subprocess installed pre-removal script returned error exit status 1           
                                                                                
                             
postinst called with unknown argument 'abort-deconfigure'                       
                                                                                
                             
dpkg: error while cleaning up:                                                  
                                                                                
                             
 subprocess installed post-installation script returned error exit status 1     
                                                                                
                             
Errors were encountered while processing:                                       
                                                                                
                             
 /var/cache/apt/archives/mariadb-server-10.1_10.1.22-4_amd64.deb                
                                                                                
                             
 /var/cache/apt/archives/mariadb-server-core-10.1_10.1.22-4_amd64.deb           
                                                                                
                             
E: Sub-process /usr/bin/dpkg returned an error code (1) 

======================================

After lots and lots of help... (the prerm script)

# cat /var/lib/dpkg/info/mariadb-server-10.1.prerm 
#!/bin/sh
# prerm script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }

# Automatically added by dh_installinit
if [ -x "/etc/init.d/mysql" ]; then
        invoke-rc.d mysql stop || exit $?
fi
# End automatically added section


# If MySQL server is still running let the admin do it himself. No
# database directories should be removed while the server is running!
# Another mysqld in e.g. a different chroot is fine for us.
if pidof -c /usr/sbin/mysqld 2>/dev/null; then
  echo "There is a MySQL server running, but we failed in our attempts to stop 
it." 1>&2
  echo "Stop it yourself and try again!" 1>&2
  exit 1
fi

exit 0

=====================

So we see the prerm script does:
invoke-rc.d mysql stop # stop the server
pidof -c /usr/sbin/mysqld # verify if actually stopped

=====================

If I repeat the operation by hand:

# invoke-rc.d mysql stop; pidof -c /usr/sbin/mysqld
3174   # the same pid you can see twice in the output above.

I can do it several times, it makes no difference.

======================

Same here:

# systemctl stop mariadb.service; pidof -c /usr/sbin/mysqld
3174

Still no difference:

# invoke-rc.d mysqld stop; pidof -c /usr/sbin/mysqld # I added a "d": mysqld
3174

========================

Try the apt-get upgrade again to be sure: no difference.

========================

Then I do, as plain user, (second line as root)

$ akonadictl stop
# pidof -c /usr/sbin/mysqld

Ta-da! server seems to be stopped...

========================

And then:

# apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  linux-image-4.8.0-2-amd64
Use 'apt autoremove' to remove it.
The following packages will be upgraded:
  mariadb-server-10.1 mariadb-server-core-10.1
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/10.4 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 179704 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.1_10.1.22-4_amd64.deb ...
/var/lib/mysql: found previous version 10.1
Unpacking mariadb-server-10.1 (10.1.22-4) over (10.1.22-3) ...
Preparing to unpack .../mariadb-server-core-10.1_10.1.22-4_amd64.deb ...
Unpacking mariadb-server-core-10.1 (10.1.22-4) over (10.1.22-3) ...
Setting up mariadb-server-core-10.1 (10.1.22-4) ...
Setting up libplist3:amd64 (1.12+git+1+e37ca00-0.3) ...
Processing triggers for libc-bin (2.24-10) ...
Processing triggers for systemd (232-22) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up mariadb-server-10.1 (10.1.22-4) ...

========================

Success!

Looks really bad to me.

Chris




Reply via email to