On Nov 11, 2008, at 1:57 AM, Bryan Blackburn wrote:
On Tue, Nov 11, 2008 at 01:20:51AM -0800, Scott Haneda said:
Hello, had some more spare time this evening, working on the assp port,
thanks to all who are entertaining me in this training process.

I am working on the port as it started, so I issue sudo port edit assp.
If I run:
clear; sudo port -d install assp
I generally get a bunch of errors, certainly a lot less if I uninstall the port first. In the interest of learning, can someone explain what is
going on, here is the output:
http://pastebin.com/m61fea40e
( I have a good deal of ui_info " MY DEBUG: *" in there )

The basic problem is that you're trying to install stuff directly, but
everything needs initially to be underneath ${destroot} so port can then figure out what files belong to the software. Your destroot phase should
get rid of the 'file delete ...' and change the copy to be

  file copy "${worksrcpath}" "${destroot}${prefix}/var/ASSP"

[...]

My destroot path is:
/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_mail_assp/work/destroot

prefix is /opt/local

So the entire final path would be
/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_mail_assp/work/destroot/opt/local/var/ASSP

I do not at all understand that. I want assp to end up in /opt/local/ var/ASSP so unless file copy does something special to a destination path, I am lost on that one.

Also, the errors I am seeing, sometimes they go away if I issue an uninstall, sometimes it seems more erratic. At the paste url http://pastebin.com/m61fea40e look at lines 96 and beyond, that is what I am trying to learn what they are all about.

pre-patch, configrue, build, and destroot all appear to be what I would call tcl functions, does the order of placement in the port file make any difference at all, or are the parsed and ran in the order they need to be?
I think the logical order would be

Order in the Portfile doesn't matter for those, they are run in the logical order (fetch, extract, patch, configure, build, destroot, install, activate)
with pre- and post- phases for each available.

Ahh nice, thanks. I am not entirely sure, you guys can be the gauge of this, but I feel my questions are not that out of the ordinary for a new port maker. I do look at the docs before I ask here, either I am a bad searcher in the docs, or the data is missing. Google tends to mostly point the the tracker, so that is of little use.

If I wanted to start adding stuff like this to the docs, would you agree it is beneficial, or am I asking questions most people understand? If you do think it is beneficial, what is the best procedure for making changes and additions to the docs?

A good example is fs-traverse, which I think is just awesome, and in looking over other ports, trying to learn, there are clear cases where it would be a better choice to use than some of the for each loops people are doing in tcl. I do not think fs-traverse is even mentioned on the docs.

Thanks, once this works, I will work on the destroot and making sure it does not nuke config and bayes database and other files, that should leave
me with figuring out what perl modules need ports.

Note that during development of a port, it's best to initially run through the destroot phase, and if at all possible, as a user who can't write to the
MacPorts install location.  Eg,

If that user can not write to the /opt/local, what would this accomplish, aside from erroring out on a permission error?

$ port -d destroot

in the Portfile directory, as you, this way if your uid doesn't have write
access, it will fail to write things directly to ${prefix} so you know
there's something that needs to be updated so it goes into
${destroot}${prefix} instead.

Where is this portfile directory?

Is there a list of all port commands, in short form, that I can use as a references? Things like `port dir MacPorts` are tremendously useful, but hard to remember and learn about.

Thanks.
--
Scott

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to