[70073] trunk/base/src/port1.0/portinstall.tcl

jmr at macports.org jmr at macports.org
Thu Jul 29 06:47:53 PDT 2010


Revision: 70073
          http://trac.macports.org/changeset/70073
Author:   jmr at macports.org
Date:     2010-07-29 06:47:52 -0700 (Thu, 29 Jul 2010)
Log Message:
-----------
workaround for [pwd] sometimes returning an empty string

Modified Paths:
--------------
    trunk/base/src/port1.0/portinstall.tcl

Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl	2010-07-29 13:45:28 UTC (rev 70072)
+++ trunk/base/src/port1.0/portinstall.tcl	2010-07-29 13:47:52 UTC (rev 70073)
@@ -142,12 +142,18 @@
 
 proc portinstall::install_main {args} {
     global name version portpath categories description long_description \
-    homepage depends_run installPlist package-install workdir \
+    homepage depends_run installPlist package-install workdir workpath \
     worksrcdir UI_PREFIX destroot revision maintainers user_options \
     portvariants negated_variants targets depends_lib PortInfo epoch license \
     registry.installtype registry.path registry.format \
     os.platform os.major
 
+    set oldpwd [pwd]
+    if {$oldpwd == ""} {
+        set oldpwd $portpath
+    }
+    _cd $workpath
+
     if {[string equal ${registry.format} "receipt_sqlite"]} {
         # registry2.0
 
@@ -266,6 +272,7 @@
         registry_write $regref
     }
 
+    _cd $oldpwd
     return 0
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100729/8b1dc9bc/attachment-0001.html>


More information about the macports-changes mailing list