Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2007 09:40:39 +0200
From:      Mark Evenson <mark.evenson@gmx.at>
To:        freebsd-questions@freebsd.org
Subject:   Re: Port dependency tool (if that's what you'd call it)
Message-ID:  <f146ho$bsr$1@sea.gmane.org>
In-Reply-To: <64c038660704292022w45b95a1en10521023bb9a3157@mail.gmail.com>
References:  <64c038660704292022w45b95a1en10521023bb9a3157@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Modulok wrote:
> I'm not quite sure how to put into word what I want, so bear with me. Is
> there a tool in the base system which does something along these lines:
> 
> 1. Look at the makefile of a given port as far as its RUN_DEPENDS and
> BUILD_DEPENDS.
> 2. Subtracting what I have already installed, provide me with information
> about what would be fetched (and possibly installed) in an easy-to-digest
> format, recursively (for all dependents of dependents ... and so on).
> 
> If not part of the base system, is there a port which offers this
> functionality?

The standard ports for this kind of functionality are

	port-mgmt/portupgrade
	port-mgmt/portmaster

'portupgrade' is the older utility; 'portmaster' has recently come on 
the "scene", with slightly different aims.  I use 'portupgrade' as I 
haven't really spent the time to learn about 'portmaster'.

Once 'portupgrade' is installed, and you have built its database with 
'pkgdb', you should be able to answer your second question via

	freebsd$ portupgrade --noexecute --upward-recursive PORTNAME

where PORTNAME is the name of the port (qv. 'ports_glob' for how this is 
specified) to give you information on what needs to be updated.  You 
might need to trim the output a bit to get the succinct list of 
dependencies that need updating, but the output of 'portupgrade' is 
quite regular so a little regexp'in in your preferred scripting language 
  should bring you to the result you want.

There may be other more direct routes to the information you seek, but 
this way will definitely work.




-- 
<Mark.Evenson@gmx.at>

"[T]his is not a disentanglement from, but a progressive knotting into."




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?f146ho$bsr$1>