From owner-freebsd-ports@FreeBSD.ORG Fri Jan 16 17:45:07 2009 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2BFA106564A for ; Fri, 16 Jan 2009 17:45:07 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [91.103.162.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1A18FC16 for ; Fri, 16 Jan 2009 17:45:07 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 353DE19E054; Fri, 16 Jan 2009 18:45:06 +0100 (CET) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id AA4B419E023; Fri, 16 Jan 2009 18:45:03 +0100 (CET) Message-ID: <4970C7D6.1020104@quip.cz> Date: Fri, 16 Jan 2009 18:45:58 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: bf2006a@yahoo.com References: <173493.20870.qm@web39105.mail.mud.yahoo.com> In-Reply-To: <173493.20870.qm@web39105.mail.mud.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@FreeBSD.org Subject: Re: direct vs. indirect port dependencies X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 17:45:08 -0000 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