How does dependency checking work?

mark abney maabney2 at yahoo.com
Thu May 17 08:33:08 PDT 2007


--- markd at macports.org wrote:

> mark abney <maabney2 at yahoo.com> on Wednesday, May 16, 2007 at 6:13 PM
> -0800 wrote:
> >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.
> 
> Also, you might consider that a variant can be used such that the default
> behavios in to install MacPorts TeTex, but the variant looks for one in
> bin:.  I can't say why bin:tex:teTex isn't working.  Could it be a case
> sensitivity issue?  What if you specify it in lower case?  As a test, you
> could also use path: like it is done in the apt Portfile:
> 
> path:${prefix}/bin/dpkg:dpkg

It's not a case sensitivity issue. The file that's in my PATH is 'tex' 
and the filename as specified in the dependency is also 'tex', but port 
simply refuses to find it. Where does it search? Or, if it does actually 
find it, ignores it and still tries to install teTeX. Any ideas where in
all the tcl code these decisions are made? I haven't tried the
path: form of dependency yet; I'll need to do more experimentation. 
Thanks for the suggestion.

> >
> >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.
> 
> port ed someport works fine, I use it all the time.  But the Portindex
> isn't updated so if you 'port search' the old version, variants, etc will
> appear, but when running the install the new changes will indeed be in
> effect.  Also, you may create a local portfile repository for more
> extrensive changes and/or ones that will survive a 'port selfupdate'. 
> Just edit the /opt/local/etc/ports/sources.conf and insert the path to a
> local repo and make sure the entry precedes the rsync entry.
> 
> file:///Users/joebob/dports
> 
> Then run 'portindex' from the ./dports directory.  Note that if you have a
> portfile for someport in the local repo that also exists in the tree, a
> port search will turn up two copies, but if the file:/// entry is first
> that is the one that will be installed.
> 

Running portindex seemed to do the trick. Before running it changes to 
the dependencies or adding a new variant seemed to be ignored, but portindex
changed that. Thanks for the tip on creating a local tree. This will make
it safer to experiment. It's too bad there isn't any documentation about 
this stuff (e.g. not even a man page for or a mention on other man pages 
about portindex), I don't know if I'll end up having the time and patience
for extensive trial and error.

Mark A



       
____________________________________________________________________________________Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/



More information about the macports-users mailing list