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. Thanks, 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&c...
mark abney <maabney2@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
--- markd@macports.org wrote:
mark abney <maabney2@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&c...
mark abney <maabney2@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
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. Mark
--- markd@macports.org wrote:
mark abney <maabney2@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/
mark abney <maabney2@yahoo.com> on Thursday, May 17, 2007 at 8:33 AM -0800 wrote:
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.
I can't answer that. I changed the subject line in hopes that someone else will chime in.
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.
There is in the legacy docs that are archived here. http://web.archive.org/web/20060427120406/darwinports.opendarwin.org/docs/ See "Using a Local Portfile Repository" Mark
On 17 May, 2007, at 11:45, markd@macports.org wrote:
mark abney <maabney2@yahoo.com> on Thursday, May 17, 2007 at 8:33 AM -0800 wrote:
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.
I can't answer that. I changed the subject line in hopes that someone else will chime in.
My understanding of darwinports.tcl:526 is that MacPorts doesn't ever use the user's PATH. If ports.conf does not include a "binpath" statement, port will construct one for its own use. The PATH it constructs doesn't include /usr/local/bin, however, which is I assume where tex is. Maybe if you edit /opt/local/etc/ports/ports.conf and add a binpath statement, e.g.: binpath /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/ usr/X11R6/bin:/usr/local/bin ...it could find it. Obviously this line will be different if it's not /usr/local. Make sure you add things last, though, because otherwise you could potentially get weird bugs that no one else does. Chris
--- Chris Pickel <chpickel@stwing.upenn.edu> wrote:
On 17 May, 2007, at 11:45, markd@macports.org wrote:
mark abney <maabney2@yahoo.com> on Thursday, May 17, 2007 at 8:33 AM -0800 wrote:
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.
I can't answer that. I changed the subject line in hopes that someone else will chime in.
My understanding of darwinports.tcl:526 is that MacPorts doesn't ever use the user's PATH. If ports.conf does not include a "binpath" statement, port will construct one for its own use. The PATH it constructs doesn't include /usr/local/bin, however, which is I assume where tex is. Maybe if you edit /opt/local/etc/ports/ports.conf and add a binpath statement, e.g.:
binpath /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/ usr/X11R6/bin:/usr/local/bin
...it could find it. Obviously this line will be different if it's not /usr/local. Make sure you add things last, though, because otherwise you could potentially get weird bugs that no one else does.
Thanks, this works and solves my problem. My understanding of how things work, although still very limited, is now much greater than before. Mark A ____________________________________________________________________________________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097
participants (3)
-
Chris Pickel
-
mark abney
-
markd@macports.org