Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 2004 10:36:30 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Brent Macnaughton <Brent.Macnaughton@rdc.ab.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Installing port - skip required port
Message-ID:  <20040504093630.GB13744@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <CE18633630425C45863BFE8EE409098C89C6B7@mercury.admin.rdc.ab.ca>
References:  <CE18633630425C45863BFE8EE409098C89C6B7@mercury.admin.rdc.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

--p4qYPpj5QlsIQJ0K
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 03, 2004 at 04:42:07PM -0600, Brent Macnaughton wrote:
> Is there any way to install a port and tell it NOT to install one or more=
 of
> it's required ports? For example: I installed the mysqlcc port, and it
> wanted to install mysql-client. I already have mysql-client installed, bu=
t I
> did not do it from the ports tree. Another port wanted to install Apache =
as
> a requirement. I already have Apache installed, but I did so from source.=
 Is
> there some command line option to tell the system not to install certain
> ports? Or better yet, a config file I where can list ports not to install.

This should happen automatically.  When you go to install a port it
doesn't look in the database of installed ports to see if its
dependencies have been met.  Rather it checks directly that particular
files or shlibs are installed on the system.  For instance, in the
mysqlcc port, the line:

    BUILD_DEPENDS=3D  qmake:${PORTSDIR}/devel/qmake

says that the devel/gmake port should be installed if the qmake
program is not available at build time.

Dealing with MySQL itself is rather harder since there are 4 different
versions available in the ports and most of the mysql dependent
software will work just fine with any of them.  That's what the
'USE_MYSQL' line in the Makefile is for.  If you look at
/usr/ports/Mk/bsd.port.mk you will find the following words of wisdom:

    # USE_MYSQL                     - Add MySQL client dependency.
    #                                         If no version is given (by th=
e maintainer via the port or
    #                                         by the user via defined varia=
ble), try to find the
    #                                         currently installed version. =
 Fall back to default if
    #                                         necessary (MySQL4.0 =3D 40).
    #

and later on in the file you'll see that it eventually resolves down
to a dependency statement like:

    LIB_DEPENDS+=3D   mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/d=
atabases/mysql${MYSQL_VER}-client

with all the version numbers filled in.  This tests for the existance
of libmysqlclient.so.X (where X is either 10, 12 or 14) and that it is
known to ld.so -- so long as you get output from

    % ldconfig -r | grep mysqlclient

then you should be OK.  If not, you should add whatever directory
you've installed the MySQL client lib to the shared library search
path:

    # ldconfig -m /usr/local/lib/mysql

and use the 'ldconfig_paths' variable in /etc/rc.conf to make that
persistent across reboots.

Similarly for the programs you have that depend on apache.
=20
> Is there also a way to tell portupgrade to skip certain ports? Next time I
> do a portupgrade -aRr i do not want it to install mysql-client or Apache.

You need to run 'pkgdb -F' -- this will find that the dependent ports
(like mysqlcc) claim to depend on whichever mysql-client port, but
there's no record of that port being installed.  In this case, just
hit Ctrl-D to delete that listed dependency -- if you're curious as to
what actually happens, take a before and after look at the +CONTENTS
file in /var/db/pkg/{portname}.

On the whole though, it's much easier just to install everything via
ports.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--p4qYPpj5QlsIQJ0K
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAl2QddtESqEQa7a0RAgTHAKCITnvY9vqNMafRBMS4EH/o19aWoACfQW0U
KhvpFQbjlhgLSh8EuwWexMA=
=8i6N
-----END PGP SIGNATURE-----

--p4qYPpj5QlsIQJ0K--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040504093630.GB13744>