Re: Installing port - skip required port

2004-05-04 Thread Daniel Bye
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, but 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.
 
 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.

Look at the file /usr/local/etc/pkgtools.conf.  Of particular interest
to you will be the HOLD_PKGS (to tell portupgrade et al. not to do
anything with ports/packages mentioned), and ALT_PKGDEP - there is an
example in the extensive inline comments that should cover your
situation.

HTH

Dan

-- 
Daniel Bye
SA-DEV
PSINet Europe

Brookmount Court
Kirkwood Road
Cambridge CB4 2QH
UK
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing port - skip required port

2004-05-04 Thread Matthew Seaman
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, but 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=  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 the 
maintainer via the port or
# by the user via defined variable), try 
to find the
# currently installed version.  Fall back 
to default if
# necessary (MySQL4.0 = 40).
#

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

LIB_DEPENDS+=   
mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/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.
 
 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

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


pgp0.pgp
Description: PGP signature