Skip to content

innotop/percona-toolkit pull installtion leaves p5-DBD-mysql client broken. #22

@stevenwilliamson

Description

@stevenwilliamson

Steps to reproduce:

[root@test1 ~]# pkgin in mysql-server-5.5.38
[root@test1 ~]# pkgin in innotop

This results in output:

downloading packages...
p5-Term-ReadKey-2.30nb7.tgz                                                                                                                                                                                                                                   100%   27KB  27.5KB/s  27.5KB/s   00:00
p5-DBI-1.631nb1.tgz                                                                                                                                                                                                                                           100%  765KB 764.9KB/s 764.9KB/s   00:01
p5-DBD-percona56-cluster-4.027nb1.tgz                                                                                                                                                                                                                         100%  228KB 228.4KB/s 228.4KB/s   00:00
innotop-1.9.1nb1.tgz                                                                                                                                                                                                                                          100%  147KB 147.1KB/s 147.1KB/s   00:01
installing packages...
installing p5-Term-ReadKey-2.30nb7...
installing p5-DBI-1.631nb1...
installing p5-DBD-percona56-cluster-4.027nb1...
installing innotop-1.9.1nb1...
pkg_install warnings: 0, errors: 2
pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log
reading local summary...
processing local summary...
updating database: 100%
marking innotop-1.9.1nb1 as non auto-removable

And then trying to run innotop

ocalhost PROCESSLIST_NO_IS: install_driver(mysql) failed: Can't load '/opt/local/lib/perl5/vendor_perl/5.20.0/x86_64-solaris-thread-multi-64/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: libmysqlclient.so.18: open failed: No such file or directory at /opt/local/lib/perl5/5.20.0/x86_64-solaris-thread-multi-64/DynaLoader.pm line 193.
 at (eval 519) line 3.
Compilation failed in require at (eval 519) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /opt/local/bin/innotop line 7592.

The Issue

The same issue is present in percona-toolkit. The issue is the regexp dependency they both share https://github.com/joyent/pkgsrc-joyent/blob/master/innotop/Makefile#L15

If no p5-DBD has been installed pkgsrc always attempt to satisfy that dep by installing percona-cluster-DBD. This in turn also attempt to install percona-cluster-server which then fails due to conflicts with the already installed mysql-server.

pkgin log file

---Aug 14 00:12:27: installing libevent-2.0.21nb3...
---Aug 14 00:12:27: installing editline-3.1.20130712nb1...
---Aug 14 00:12:27: installing perl-5.20.0nb2...
---Aug 14 00:12:28: installing mysql-client-5.1.72nb3...
---Aug 14 00:12:29: installing mysql-server-5.1.72nb1...
---Aug 14 00:13:49: installing p5-Term-ReadKey-2.30nb7...
---Aug 14 00:13:49: installing p5-DBI-1.631nb1...
---Aug 14 00:13:49: installing p5-DBD-percona56-cluster-4.027nb1...
pkg_add: Package `percona-cluster-5.6.21nb3' conflicts with `{mysql,percona}*-{client,server}-[0-9]*', and `mysql-client-5.1.72nb3' is installed.
pkg_add: Can't install dependency percona-cluster>=5.6.15<5.7, continuing
pkg_add: Package `percona-cluster-5.6.21nb3' conflicts with `{mysql,percona}*-{client,server}-[0-9]*', and `mysql-client-5.1.72nb3' is installed.
pkg_add: Can't install dependency percona-cluster>=5.6.15, continuing
---Aug 14 00:13:51: installing innotop-1.9.1nb1...

Im not sure what the fix should be here, but it is suboptimal at the moment. The issue is there isn't enough information present at package install time for pkgsrc to pick the correct p5-DBD package to fulfil the dependency. As the correct package can only be determined by inspecting what is already installed.

Having deps evaluated at runtime supporting some kind of conditional could be a solution:

if "mysql-server" installed; p5-dep = p5-dep-variant1
if "percona-server" install; p5-dep = p5-dep-variant2

This might not be the best solution and would require a lot of effort on the face of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions