How does dependency checking work?

markd at macports.org markd at macports.org
Wed May 16 14:02:22 PDT 2007


mark abney <maabney2 at yahoo.com> on Wednesday, May 16, 2007 at 8:01 AM
-0800 wrote:
>Since my last request for help garnered nothing, I think I'll try a
>different tack. In particular, how does port check to see whether
>dependencies are satisfied? I'm primarily interested in dependencies in
>the port file of the form depends_lib bin:somename:someport. Under what
>sort of circumstances is a dependency of this sort supposed to be used?
>How does port check for this? (e.g. where does it look for somename?
>Does somename have to be executable?) I'm afraid I don't really know
>tcl, but looking through port suggests to me that this sort of thing is
>nor done directly by port? I see looking through the wiki (and from
>stdout when installing a port) that there are various phases, e.g.
>com.apple.main, com.apple.build, etc, that are being executed. Are
>these tcl scripts that are being executed? I'm happy to try to figure
>this out on my own, but I can't find any relevant documentation. If
>someone has answers to some of these questions, or could even point me
>to where I might be able to turn to figure out the answers (I'm willing
>to read through code), it would be greatly appreciated.

Hi Mark,

MacPorts team made a decision way back to prefer MacPorts own stuff for
predictability and to get the latest code rather than whatever release is
current for Apple, so dependencies of the type bin: or lib: are being
moved away from except where it is necessary or desireable for a special
reason.  This was a policy decision.  So use port: unless there is a good
reason not to so the dependecy will be fulfilled by a MacPort.

I think that these dependency specs just check for the presence of the
file, not whether it it valid in any way or not.  This is done by the port
command, and it is TCL being executed.  Our documentation is lacking right
now, but I hope that helps.  Ask followups as necessary.

Mark




More information about the macports-users mailing list