<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="1047337">
  <date_last_updated>2012-09-10 23:18:35.497341+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/1047337</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~david-davidfavor</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.5</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/1047337/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/1047337/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/1047337</bug_web_link>
  <owner>David Favor</owner>
  <assignee>Sergei</assignee>
  <milestone_title>Maria 5.5</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed</title>
  <status>New</status>
  <importance>Undecided</importance>
  <created>2012-09-07 12:47:29.980626+00:00</created>
  <description>
<![CDATA[This bug blocks installation/upgrade of latest MariaDB packages if mariadb-test is requested.

This means if package mytop is installed and mariadb-test is installed, an upgrade completely
breaks MariaDB upgrade so files are partially installed and database will not start.

The quick fix is to issue 'dpkg --purge mytop' at the command line, then go through the
install/upgrade procedure again.

See log below for details.

dpkg: error processing /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb (--unpack):
    trying to overwrite '/usr/bin/mytop', which is also in package mytop 1.6-6

This error is thrown when the mytop package has already been installed.

Suggest adding conflict resolution to MariaDB packaging which tests for the existence of /usr/bin/mytop
and if it exists execute 'dpkg -S /usr/bin/mytop' to determine the package owning /usr/bin/mytop, then
direct the user to manually deinstall this package (dpkg --purge mytop) before proceeding.
_______

net1# pkg-update 
+ apt-get -qq update
+ aptitude upgrade
The following packages will be upgraded: 
  libmariadbclient-dev libmariadbclient18 libmariadbd-dev libmysqlclient18 mariadb-client mariadb-client-5.5 
  mariadb-client-core-5.5 mariadb-common mariadb-server mariadb-server-5.5 mariadb-server-core-5.5 mariadb-test 
  mariadb-test-5.5 mysql-common 
14 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.3 MB of archives. After unpacking 1,671 kB will be used.
Do you want to continue? [Y/n/?] 
Get: 1 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server all 5.5.27-mariadb1~precise [2,958 B]
Get: 2 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-test all 5.5.27-mariadb1~precise [2,768 B]
Get: 3 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client all 5.5.27-mariadb1~precise [2,832 B]
Get: 4 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mysql-common all 5.5.27-mariadb1~precise [8,776 B]
Get: 5 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-common all 5.5.27-mariadb1~precise [3,274 B]
Get: 6 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient18 amd64 5.5.27-mariadb1~precise [809 kB]
Get: 7 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmysqlclient18 amd64 5.5.27-mariadb1~precise [2,922 B]
Get: 8 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-core-5.5 amd64 5.5.27-mariadb1~precise [1,798 kB]
Get: 9 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-test-5.5 all 5.5.27-mariadb1~precise [64.8 MB]
Get: 10 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-5.5 amd64 5.5.27-mariadb1~precise [5,082 kB]
Get: 11 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-core-5.5 amd64 5.5.27-mariadb1~precise [5,205 kB]
Get: 12 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-5.5 amd64 5.5.27-mariadb1~precise [17.7 MB]
Get: 13 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient-dev amd64 5.5.27-mariadb1~precise [1,834 kB]
Get: 14 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbd-dev amd64 5.5.27-mariadb1~precise [2,894 B]   
Fetched 97.3 MB in 28s (3,382 kB/s)                                                                                               
Preconfiguring packages ...
(Reading database ... 132154 files and directories currently installed.)
Preparing to replace mariadb-server 5.5.25-mariadb1~precise (using .../mariadb-server_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-server ...
Preparing to replace mariadb-test 5.5.25-mariadb1~precise (using .../mariadb-test_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-test ...
Preparing to replace mariadb-client 5.5.25-mariadb1~precise (using .../mariadb-client_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-client ...
Preparing to replace mysql-common 5.5.25-mariadb1~precise (using .../mysql-common_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mysql-common ...
Preparing to replace mariadb-common 5.5.25-mariadb1~precise (using .../mariadb-common_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-common ...
Preparing to replace libmariadbclient18 5.5.25-mariadb1~precise (using .../libmariadbclient18_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement libmariadbclient18 ...
Preparing to replace libmysqlclient18 5.5.25-mariadb1~precise (using .../libmysqlclient18_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement libmysqlclient18 ...
Preparing to replace mariadb-client-core-5.5 5.5.25-mariadb1~precise (using .../mariadb-client-core-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-client-core-5.5 ...
Preparing to replace mariadb-test-5.5 5.5.25-mariadb1~precise (using .../mariadb-test-5.5_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-test-5.5 ...
Preparing to replace mariadb-client-5.5 5.5.25-mariadb1~precise (using .../mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-client-5.5 ...
dpkg: error processing /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mytop', which is also in package mytop 1.6-6
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace mariadb-server-core-5.5 5.5.25-mariadb1~precise (using .../mariadb-server-core-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-server-core-5.5 ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up mariadb-server (5.5.27-mariadb1~precise) ...
Setting up mariadb-client (5.5.27-mariadb1~precise) ...
dpkg: dependency problems prevent configuration of mariadb-test-5.5:
 mariadb-test-5.5 depends on mariadb-server-5.5 (= 5.5.27-mariadb1~precise); however:
  Version of mariadb-server-5.5 on system is 5.5.25-mariadb1~precise.
 mariadb-test-5.5 depends on mariadb-client-5.5 (= 5.5.27-mariadb1~precise); however:
  Version of mariadb-client-5.5 on system is 5.5.25-mariadb1~precise.
dpkg: error processing mariadb-test-5.5 (--configure):
 dependency problems - leaving unconfigured
Setting up mysql-common (5.5.27-mariadb1~precise) ...
Installing new version of config file /etc/mysql/my.cnf ...
Setting up mariadb-common (5.5.27-mariadb1~precise) ...
dpkg: dependency problems prevent configuration of mariadb-test:
 mariadb-test depends on mariadb-test-5.5; however:
  Package mariadb-test-5.5 is not configured yet.
dpkg: error processing mariadb-test (--configure):
 dependency problems - leaving unconfigured
Setting up libmysqlclient18 (5.5.27-mariadb1~precise) ...
Setting up libmariadbclient18 (5.5.27-mariadb1~precise) ...
Setting up mariadb-client-core-5.5 (5.5.27-mariadb1~precise) ...
Setting up mariadb-server-core-5.5 (5.5.27-mariadb1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 mariadb-test-5.5
 mariadb-test
                                         
Current status: 1 broken [+1], 4 updates [-10].
+ apt-get -y autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
+ apt-get -y autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 mariadb-test-5.5 : Depends: mariadb-server-5.5 (= 5.5.27-mariadb1~precise) but 5.5.25-mariadb1~precise is installed
                    Depends: mariadb-client-5.5 (= 5.5.27-mariadb1~precise) but 5.5.25-mariadb1~precise is installed
E: Unmet dependencies. Try using -f.]]>  </description>
  <activities>
    <activity datechanged="2012-09-07T12:47:29.980626+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>David Favor</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2012-09-07T12:48:28.010383+00:00">
      <oldvalue>
<![CDATA[Ubuntu packaging mariadb-client-5.5.27 and mytop conflic]]>      </oldvalue>
      <newvalue>
<![CDATA[Ubuntu nmariadb-client-5.5.27 upgrade leaves MariaDB unstartable]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>David Favor</person>
      <message></message>
    </activity>
    <activity datechanged="2012-09-07T12:48:38.145235+00:00">
      <oldvalue>
<![CDATA[Ubuntu nmariadb-client-5.5.27 upgrade leaves MariaDB unstartable]]>      </oldvalue>
      <newvalue>
<![CDATA[Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>David Favor</person>
      <message></message>
    </activity>
    <activity datechanged="2012-09-07T12:48:57.136605+00:00">
      <oldvalue>
<![CDATA[Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable]]>      </oldvalue>
      <newvalue>
<![CDATA[Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>David Favor</person>
      <message></message>
    </activity>
    <activity datechanged="2012-09-07T13:07:57.862436+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Sergei (sergii)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Elena Stepanova</person>
      <message></message>
    </activity>
    <activity datechanged="2012-09-07T13:08:02.350143+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.5]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Elena Stepanova</person>
      <message></message>
    </activity>
    <activity datechanged="2012-09-07T15:35:40.668916+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[lp:~maria-captains/maria/5.5-serg]]>      </newvalue>
      <whatchanged>branch linked</whatchanged>
      <person>Launchpad Janitor</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/1" datecreated="2012-09-07T13:09:35.353014+00:00">
      <person>Elena Stepanova</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[Hi David,

Was it different with 5.5.25, or did you install the mytop package when 5.5.25 had already been installed?]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/2" datecreated="2012-09-07T13:27:23.391090+00:00">
      <person>David Favor</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[Fix verified on another identical server.

apt-get --purge remove mytop && apt-get -qq update && aptitude upgrade]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/3" datecreated="2012-09-07T22:37:54.296133+00:00">
      <person>David Favor</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[It appears I installed mariadb-5.5.25 then mytop.

Then did an upgrade when mariadb-5.5.27 released.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/4" datecreated="2012-09-08T12:12:04.345267+00:00">
      <person>Omega8.cc</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[The same issue on a few Debian Squeeze servers we have tried to upgrade, all running mariadb-5.5.25 and mytop installed.

To recover and install MariaDB again it was required to not only remove & purge mytop, but also rm -f /usr/bin/mytop because it was not really deleted for some reason. It looks like mytop bundled with MariaDB doesn't check and upgrade existing mytop package properly.

dpkg: error processing /var/cache/apt/archives/mytop_1.6-6_all.deb (--unpack):
 trying to overwrite '/usr/bin/mytop', which is also in package mariadb-client-5.5 5.5.27-mariadb1~squeeze
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/mytop_1.6-6_all.deb
Setting up libconfig-inifiles-perl (2.52-1) ...
Setting up libmariadbclient-dev (5.5.27-mariadb1~squeeze) ...
Setting up libmariadbd-dev (5.5.27-mariadb1~squeeze) ...
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/5" datecreated="2012-09-08T13:24:39.080818+00:00">
      <person>David Favor</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[Sounds like the mytop package has problems on Debian.

The mytop executable is deleted (as expected) when the Ubuntu package is removed.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1047337/comments/6" datecreated="2012-09-10T13:01:18.334067+00:00">
      <person>Elena Stepanova</person>
      <subject>
<![CDATA[Re: Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed]]>      </subject>
      <content>
<![CDATA[See also https://mariadb.atlassian.net/browse/MDEV-519]]>      </content>
    </comment>
  </comments>
  <branches>
    <branch>lp:~maria-captains/maria/5.5-serg</branch>
  </branches>
</launchpad-bug>
