A portupgrade question

Ian Moore no-spam at swiftdsl.com.au
Tue Apr 25 00:14:36 UTC 2006

On Monday 24 April 2006 23:56, Matthew Seaman wrote:
> 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

Nope, I get no output at all!
> 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

Yes, that's what my system shows.

> 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.

Yes, that sorted things out - libgda installed without trying to re-install 
mysql40-client this time.
> 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.

I'll remember that one.
> 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

So to sum up, it's a problem with the way the ports system detects wether the 
mysql-client port is installed that caused the problem (I thought it just 
used the ports database), and/or it's a problem with the mysql-client port 
not registering libmysqlclient.so ?

Thanks for your help in sorting that out, I knew it was something more than 
just not using the recursion switches with portupgrade.

gpg key: http://home.swiftdsl.com.au/~imoore/no-spam.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060425/e6ace942/attachment.pgp

More information about the freebsd-questions mailing list