On May 13, 2008, at 3:45 AM, Anders F Björklund wrote:

Ryan Schmidt wrote:

We can't use 'array unset env' as that is documented to disconnect Tcl from the environment, and some messing around hasn't shown a clean way to work around this. Maybe a Tcl expert is needed, and determining if this is Mac-specific or 8.4.7; of course, either way, we have to deal with it.

FYI, this is done in portutil.tcl (base/src/port1.0/) in proc command_exec.

Thanks for the analysis! I added a link to your explanation to http://trac.macports.org/wiki/LeopardProblems

Do we really not have a macports base ticket for this issue yet? I couldn't find one but maybe I'm searching wrong. We need one so that we can mark all the other port bugs that are cropping up as duplicates of it.

As far as I can tell, Apple explicitly enables the use of "putenv" to clear out environment variables in Leopard's tcl-64 variant (#define USE_PUTENV 1). Whereas the original tcl 8.4.7 (and Tiger's tcl-20.1.4 too) only uses that on Windows, as far as I can tell. And sets the var to NULL otherwise. Still doesn't explain why doing a "port clean" and restarting fixes it, but it's a difference between the two Tcl-8.4.7's ?

The USE_PUTENV problem was said to have been fixed in tcl 8.5a2 and 8.4.12 via the 979640-env-hobbs.patch in this ticket:

http://sourceforge.net/tracker/index.php? func=detail&aid=979640&group_id=10894&atid=110894

However, I downgraded the tcl port to 8.4.7, added -DUSE_PUTENV to the CPPFLAGS, and it still was able to unset environment variables properly. In other words, I would like to reproduce the problem in the MacPorts tcl, but I cannot.

I do see that Apple is #defining USE_PUTENV 1 on Leopard's tcl, but they're also patching a lot of other things:

http://www.opensource.apple.com/darwinsource/10.5.2/tcl-64/tcl/tcl.diff

I wonder if maybe some of those other patches are the cause of the problem.

I'll look into this problem more later.


_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to