Ian Moore wrote: > Hi, I've got a question about portupgrade and something that's happened with > it a couple of times now. The last 2 times libgda has been upgraded, I've run > portupgrade -a to upgrade a bunch of ports, including libgda. > > The libgda upgrade has caused a re-install of mysql-client-4, but when > portupgrade has tried to install mysql-client, it's failed because > mysql-client is already installed. > > The workaround for this is simple enough, delete mysql-client and then run > portupgrade again, but I'm wondering why this situation occurs - portupgrade > should see that mysql-client is already installed and not try to install it > again (or if it needs upgrading, it should deinstall the old version and > build & install the new version). > > /etc/ports/UPDATING doesn't seem to help, there's no mention of either port > in > it.
The reason the ports system can't detect that you've already got mysql-client software installed is because you haven't got libmysqlclient.so in your loader cache. Try this command -- you should get similar output: lack-of-gravitas:~:% ldconfig -r | grep mysqlclient 441:-lmysqlclient_r.14 => /usr/local/lib/mysql/libmysqlclient_r.so.14 442:-lmysqlclient.14 => /usr/local/lib/mysql/libmysqlclient.so.14 ldconfig(8) needs to be told to scan /usr/local/lib/mysql for shared libraries, as that's not one of the default directories. This is generally handled through the ldconfig_compat port which installs precisely one file: sisyphus:~:% pkg_info -L ldconfig_compat-1.0_7 Information for ldconfig_compat-1.0_7: Files: //etc/rc.d/ldconfig_compat although you can also add /usr/local/lib/mysql to the set of stuff scanned by ldconfig by modifying variables in /etc/rc.conf (but that's the old and unfashionable way of doing this...). Re-installing that port and running /etc/rc.d/ldconfig_compat start should sort out the problem you're seeing. Note that mergemaster(1) will ask you to delete that file because it's in /etc/rc.d and it's not one of the one installed by the system. You should resist the suggestion to do that, or put up with various MySQL (and certain other port) related things not working in the way you might expect. Note too: this is system version number dependant -- recent 6.1-STABLE or above will have the ldconfig_compat script installed in /usr/local/etc/rc.d Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK
signature.asc
Description: OpenPGP digital signature