Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2009 18:45:58 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        bf2006a@yahoo.com
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: direct vs. indirect port dependencies
Message-ID:  <4970C7D6.1020104@quip.cz>
In-Reply-To: <173493.20870.qm@web39105.mail.mud.yahoo.com>
References:  <173493.20870.qm@web39105.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
bf wrote:
> Did you read the thread entitled "Perl upgrade question" in which a
> method for doing this was discussed, in the past few days?
> 
> Alternatively, you could run something like:
> 
> #!/bin/sh
> for pdir in `pkg_info -aqo`
> do
> [ -z `make -C /usr/ports/$pdir -V USE_PERL5 -V USE_PERL5_RUN` ] || \
> echo "$pdir"
> #or, if you prefer:
> #echo `make -C /usr/ports/$pdir -V PKGNAME`
> done
> 
> to get the names of the ports whose maintainer has asked for 
> perl-5.8.x to be a RUN_DEPENDS using the USE_PERL_* framework in bsd.perl.mk.  There are probably many other variations (some of them
> more efficient and elegant, no doubt). But the only truly thorough
> way to determine which ports need to be rebuilt/modified is to look 
> at the source code for each, which you probably won't need to do for
> this upgrade.

I read the thread and I also post to this thread. But I am not solving 
any Perl problem in this case. I asked this question about direct and 
indirect dependencies in general. Perl was just a well known example 
from real life.

I am still looking for general way to find out what dependency (listed 
in +CONTENTS or +REQUIRED_BY) is direct dependency [port can not be used 
without it] and indirect [inherited from parental port].

 From my point of view, the following situation is "wrong":
root@kavkaz ~/# pkg_info -r apache-2.2.11
Information for apache-2.2.11:

Depends on:
Dependency: expat-2.0.1
Dependency: perl-5.8.9
Dependency: pcre-7.8
Dependency: mysql-client-5.0.75
Dependency: db41-4.1.25_4
Dependency: libiconv-1.11_1

root@kavkaz ~/# pkg_info -r php5-session-5.2.8
Information for php5-session-5.2.8:

Depends on:
Dependency: expat-2.0.1
Dependency: perl-5.8.9
Dependency: pkg-config-0.23_1
Dependency: pcre-7.8
Dependency: mysql-client-5.0.75
Dependency: db41-4.1.25_4
Dependency: libiconv-1.11_1
Dependency: libxml2-2.7.2_1
Dependency: apache-2.2.11
Dependency: php5-5.2.8

root@kavkaz ~/# pkg_info -R mysql-client-5.0.75
Information for mysql-client-5.0.75:

Required by:
apache-2.2.11
pecl-fileinfo-1.0.4
php5-5.2.8
php5-bz2-5.2.8
php5-ctype-5.2.8
php5-curl-5.2.8
php5-dom-5.2.8
php5-exif-5.2.8
php5-extensions-1.2
php5-ftp-5.2.8
php5-gd-5.2.8
php5-iconv-5.2.8
php5-imap-5.2.8
php5-mbstring-5.2.8
php5-mcrypt-5.2.8
php5-mysql-5.2.8
php5-mysqli-5.2.8
php5-openssl-5.2.8
php5-posix-5.2.8
php5-session-5.2.8
php5-simplexml-5.2.8
php5-sockets-5.2.8
php5-spl-5.2.8
php5-sqlite-5.2.8
php5-tokenizer-5.2.8
php5-xml-5.2.8
php5-xmlreader-5.2.8
php5-xmlwriter-5.2.8
php5-zip-5.2.8
php5-zlib-5.2.8
phpMyAdmin-3.1.1
postfix-2.5.5,1
mysql-server-5.0.75
proftpd-mysql-1.3.2.r3_1
ZendOptimizer-3.3.0.a
p5-DBD-mysql-4.006
mytop-1.6_4


...and I am looking for the way how can I list only those ports directly 
dependent on mysql-client. (for example in case of php5 extensions, I am 
sure that only php5-mysql-5.2.8, php5-mysqli-5.2.8 are related to 
mysql-client, not all listed above, phpMyAdmin also does not need 
mysql-client, it needs php5-mysql, ZendOptimizer does not need 
mysql-client...)

For example 'portmaster -r mysql-client-5.0.75' will reinstall all 
listed ports above, but it is not needed!

So the simple question - is there any command or arguments to pkg_info 
to list direct dependencies only?

Miroslav Lachman



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