ports conflict

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Oct 29 07:10:21 PDT 2004


On Fri, Oct 29, 2004 at 04:02:19PM +0300, Petre Bandac wrote:
 
> I get this error when portupgrading amavisd-new
> 
> xxl# pkg_info p5-Mysql-modules-1.2219
> [snip]
> Required by:
> amavisd-new-20040701

Yes.  You've actually found quite a special case in the ports tree,
where there are two different ports which are virtually
interchangeable.  The really cunning thing is that the ports system
lets you do that -- when a port lists a dependency on another port,
what it checks for at compile time is that a representative file or
shlib is present on the system.  It doesn't even look at the list of
installed ports and try and compare against the pkg names.

Thus taking amavisd-new as the example, if you compile it WITH_MYSQL,
it has a RUN_DEPENDS as follows:

    RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql

After expanding all of those Make variables, that means the
amavisd-new port checks for the existence of
/usr/local/lib/perl5/site_perl/5.8.5/mach/Mysql.pm to fulfil that
dependency.

The second part of the RUN_DEPENDS line, after the colon, is a
/suggestion/ of which port to install to fill the dependency if that
is needed.  Note that it lists databases/p5-DBD-mysql -- but that on
your system, you're using databases/p5-Mysql-modules instead.

You don't have to use that particular port.  You don't even have to
fulfil the dependency using software installed via the ports system.
What you will find though is that you will need to use pkgdb(1) to fix
up the records for each installed package, as the pkg_install step
can't do that automatically.
 
> and also there is another interesting thing:
> 
> xxl# use.perl --help
> Usage:
>   /usr/local/bin/use.perl port       -> /usr/bin/perl is the perl5 port
>   /usr/local/bin/use.perl system     -> /usr/bin/perl is the system perl
> 
> perl has the same path for the system and port version

Yes.  That's so you can always put:

    #!/usr/bin/perl

at the top of any perl script and have it work.  If you examine
/usr/bin/perl more closely, you'll see that it is infact a symbolic
link to whatever the real binary is:

    % ls -l /usr/bin/perl 
    lrwxr-xr-x  1 root  wheel  19 Jul 30 14:18 /usr/bin/perl@ -> /usr/local/bin/perl

Part of what the 'use.perl' script does is setup that link to point to
the right place.

	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
-------------- 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/20041029/a6a002eb/attachment.bin


More information about the freebsd-questions mailing list