[51429] trunk/base/src/macports1.0/macports_fastload.tcl.in

Bryan Blackburn blb at macports.org
Mon May 25 18:52:41 PDT 2009


On Tue, May 26, 2009 at 12:32:16AM +0200, Rainer Müller said:
> On 2009-05-25 21:52, Bryan Blackburn wrote:
> > On Mon, May 25, 2009 at 01:58:20PM +0200, Rainer Müller said:
> >> On 2009-05-25 06:17, blb at macports.org wrote:
> > Since macports_fastload.tcl doesn't know whether it's being called during
> > make or actual runtime, I couldn't think of a better solution than this.
> > 
> >> Is the problem with one of the Tcl scripts we run at install time? Maybe
> >> they have to be delayed until all files are copied then.
> > 
> > It's part of the pkgIndex stuff so when you made it more sensitive to errors
> > with pkg_mkindex.sh the error now stops make.  Note that if you run make
> > again all is fine...
> 
> Oh, so pkg_mkIndex actually evaluates the code. I thought it just parses
> for procs in the files. I did a quick test by adding a puts statement in
> the file and it really gets executed.
> 
> Good to be aware it does that, but also kind of evil...

Yeah, pkg_mkIndex basically sources each file, or to quote the man page

   It does this by loading each file into a slave interpreter and seeing
   what packages and new commands appear (this is why it is essential to
   have package provide commands or Tcl_PkgProvide calls in the files,
   as described above).

At least fastload was the only one causing an issue.

Bryan


> 
> Rainer


More information about the macports-dev mailing list