Re: A portupgrade question



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

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: A portupgrade question
    ... I've run portupgrade -a to upgrade a bunch of ports, ... portupgrade has tried to install mysql-client, ... to install it again (or if it needs upgrading, ... handled through the ldconfig_compat port which installs precisely one file: ...
    (freebsd-questions)
  • Re: Portinstall question
    ... I was just wondering why you would want to use portinstall to ... install new software, rather than: ... portinstall is just portupgrade by another name. ... an already installed port. ...
    (freebsd-questions)
  • Re: portupdate xorg-server
    ... Any port upgrading tool belongs in a port, ... Never did I claim portupgrade fails where a normal make install would succeed. ...
    (freebsd-questions)
  • Re: q???
    ... > yes, it does download and install auto, this is what i actually was ... After you cvsup the ports system, you can use portupgrade to: ... Upgrade an application, all of its dependencies, and all of the ports ...
    (freebsd-questions)
  • portmanager looping on libtool on 6.2 -> 6.3 upgrade
    ... I'm in the process of bringing a production web/mail server up to FreeBSD 7.0 from 6.2. ... After practicing the process on a non-production box set up in essentially the same manner, I discovered that the only major issue to look out for was the fact that I needed to hold back the upgrade of Python, since the CMS system running on the box will die if it doesn't have Python 2.4 specifically. ... Port Status Report "forced mode" ... I've tried simply going into /usr/ports/devel/libtool15 and running "suod make install clean", and I end up with this output: ...
    (freebsd-questions)