MariaDB 5.2.x server RPM fails on upgrades - error: scriptlet failed, exit status 1

You are viewing an old version of this question. View the current version here.

This problem occurs on CentOS 5.5/5.6/6.0 32bit and 64bit from first time I used MariaDB 5.2.3 all the way to 5.2.9 upgrade. It happens

1) via manual RPM upgrade from RPM downloaded at http://downloads.askmonty.org/mariadb/5.2/#file_type=rpm or 2) via ourdelta YUM REPO update http://ourdelta.org/centos (yum update MariaDB*).

Problem, MariaDB-server-5.2.x RPM updates fails and needs manually removing previous version MariaDB-server-5.2.x RPM before the new update installs.

error

error: %pre(MariaDB-server-5.2.9-102.el5.x86_64) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping MariaDB-server-5.2.9-102.el5

full details below

[root@centos6 ~]# yum update MariaDB*
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirror.colocity.com
 * extras: mirror.colocity.com
 * rpmforge: apt.sw.be
 * updates: mirror.colocity.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:5.2.9-102.el5 set to be updated
---> Package MariaDB-devel.x86_64 0:5.2.9-102.el5 set to be updated
---> Package MariaDB-server.x86_64 0:5.2.9-102.el5 set to be updated
---> Package MariaDB-shared.x86_64 0:5.2.9-102.el5 set to be updated
---> Package MariaDB-test.x86_64 0:5.2.9-102.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                             Arch                        Version                             Repository                               Size
===================================================================================================================================================
Installing:
 MariaDB-client                      x86_64                      5.2.9-102.el5                       ourdelta-mariadb52                      1.0 M
     replacing  MariaDB-client.x86_64 5.2.7-101.el5
 MariaDB-devel                       x86_64                      5.2.9-102.el5                       ourdelta-mariadb52                       33 M
     replacing  MariaDB-devel.x86_64 5.2.7-101.el5
 MariaDB-server                      x86_64                      5.2.9-102.el5                       ourdelta-mariadb52                       18 M
     replacing  MariaDB-server.x86_64 5.2.7-101.el5
 MariaDB-shared                      x86_64                      5.2.9-102.el5                       ourdelta-mariadb52                      3.5 M
     replacing  MariaDB-shared.x86_64 5.2.7-101.el5
 MariaDB-test                        x86_64                      5.2.9-102.el5                       ourdelta-mariadb52                      166 k
     replacing  MariaDB-test.x86_64 5.2.7-101.el5

Transaction Summary
===================================================================================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 56 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): MariaDB-client-5.2.9-102.el5.x86_64.rpm                                                                              | 1.0 MB     00:02     
(2/5): MariaDB-devel-5.2.9-102.el5.x86_64.rpm                                                                               |  33 MB     00:58     
(3/5): MariaDB-server-5.2.9-102.el5.x86_64.rpm                                                                              |  18 MB     00:21     
(4/5): MariaDB-shared-5.2.9-102.el5.x86_64.rpm                                                                              | 3.5 MB     00:26     
(5/5): MariaDB-test-5.2.9-102.el5.x86_64.rpm                                                                                | 166 kB     00:02     
---------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                              512 kB/s |  56 MB     01:52     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : MariaDB-shared-5.2.9-102.el5.x86_64                                                                                        1/10 
  Installing     : MariaDB-client-5.2.9-102.el5.x86_64                                                                                        2/10 
Error in PREIN scriptlet in rpm package MariaDB-server-5.2.9-102.el5.x86_64

******************************************************************
A MySQL or MariaDB server package (MariaDB-server-5.2.7-101.el5.x86_64) is installed.

The current MariaDB server package is provided by a different
vendor (MariaDB (http://mariadb.com/)) than OurDelta - http://ourdelta.org/.  Some files may be installed
to different locations, including log files and the service
startup script in /etc/init.d/.

A manual upgrade is required.

- Ensure that you have a complete, working backup of your data and my.cnf
  files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages.  Usually this command will
  list the packages you should remove:
  rpm -qa | grep -i '^mysql-'

  You may choose to use 'rpm --nodeps -ev <package-name>' to remove
  the package which contains the mysqlclient shared library.  The
  library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by OurDelta - http://ourdelta.org/
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program

This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-5.2.9-102.el5.x86_64) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping MariaDB-server-5.2.9-102.el5
  Installing     : MariaDB-test-5.2.9-102.el5.x86_64                                                                                          4/10 
  Installing     : MariaDB-devel-5.2.9-102.el5.x86_64                                                                                         5/10 
  Cleanup        : MariaDB-test-5.2.7-101.el5.x86_64                                                                                          6/10 
  Cleanup        : MariaDB-client-5.2.7-101.el5.x86_64                                                                                        7/10 
  Cleanup        : MariaDB-shared-5.2.7-101.el5.x86_64                                                                                        8/10 
  Cleanup        : MariaDB-devel-5.2.7-101.el5.x86_64                                                                                         9/10 
MariaDB-server-5.2.7-101.el5.x86_64 was supposed to be removed but is not!

Installed:
  MariaDB-client.x86_64 0:5.2.9-102.el5            MariaDB-devel.x86_64 0:5.2.9-102.el5            MariaDB-shared.x86_64 0:5.2.9-102.el5           
  MariaDB-test.x86_64 0:5.2.9-102.el5             

Replaced:
  MariaDB-client.x86_64 0:5.2.7-101.el5            MariaDB-devel.x86_64 0:5.2.7-101.el5            MariaDB-server.x86_64 0:5.2.7-101.el5           
  MariaDB-shared.x86_64 0:5.2.7-101.el5            MariaDB-test.x86_64 0:5.2.7-101.el5            

Failed:
  MariaDB-server.x86_64 0:5.2.9-102.el5
[root@centos6 ~]# rpm -qa | grep -i MariaDB
MariaDB-test-5.2.9-102.el5.x86_64
MariaDB-client-5.2.9-102.el5.x86_64
MariaDB-shared-5.2.9-102.el5.x86_64
MariaDB-server-5.2.7-101.el5.x86_64
MariaDB-devel-5.2.9-102.el5.x86_64

Answer

I believe this is due to files not being removed properly, possibly between the RPM's.

I'll try to replicate this and figure out why.

Currently am working on MariaDB's RPM's, and trying to get them RH/Etc approved which requires everything working in upgrades and what not. Just got EL6 rpm's started, so this is next but the RPM system is fun :D

Also believe I noticed this on my own systems and I'd always run rpm -e MariaDB-Server, so this has priority.

Bug #863577

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.