How does dependency checking work?

mark abney maabney2 at yahoo.com
Wed May 16 18:13:02 PDT 2007


--- markd at macports.org wrote:

> 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.
> 

Thanks. I understand and agree with the policy of keeping as much
within Macports as possible. My immediate undertaking was trying to
modify the gnuplot portfile so that it does not require installing
teTeX. From my still limited understanding, if a user already has tex
installed then it shouldn't install tetex if the dependency in the
portfile is of the form bin:tex:teTeX. Apparently this does not seem to
be the case, and I don't really understand why. (I have Tex Live 2007
installed and tex is definitely in my path). I think a reasonable case
can be made for this form of dependency on teTeX, but, in any case, it
doesn't work.

On a related note, is there an explanation somewhere of how to make
changes to portfiles and then install with those modifications? If I do
"port edit someport", I get to edit the portfile, but somehow when I
then try to install, it seems the old portfile is still being used. I'm
sure I must be missing some step. My objective is to make some updates
to some ports, and if all goes well suggest those changes be
implemented in Macports. (For instace plotutils uses the 2.4.1 version
from 2000 rather than the 2.5 version from 2006, although from the web
page you would never know there actually existed a 2.5 version). Note
that this is not actually the problem I was having with gnuplot as the
portfile already has the depency in the form I mention above.

Mark A



       
____________________________________________________________________________________Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 



More information about the macports-users mailing list