[28796] trunk/base/src

source_changes at macosforge.org source_changes at macosforge.org
Sat Sep 8 22:29:36 PDT 2007


Revision: 28796
          http://trac.macosforge.org/projects/macports/changeset/28796
Author:   landonf at macports.org
Date:     2007-09-08 22:29:36 -0700 (Sat, 08 Sep 2007)

Log Message:
-----------
- Hide 'cd' as '_cd'. It should be removed entirely once the few uses can be fixed in port1.0
- Fix escaping of } { in strings in base/src/port1.0/portinstall.tcl

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/port1.0/portdestroot.tcl
    trunk/base/src/port1.0/portinstall.tcl
    trunk/base/src/port1.0/portpatch.tcl
    trunk/base/src/port1.0/resources/group/gnustep-1.0.tcl
    trunk/base/src/port1.0/resources/group/ruby-1.0.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/macports1.0/macports.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -636,6 +636,9 @@
     # exit: It should not be possible to exit the interpreter
     interp hide $workername exit
 
+    # cd: This is necessary for some code in port1.0, but should be hidden
+    interp eval $workername "rename cd _cd"
+
     # Tell the sub interpreter about all the Tcl packages we already
     # know about so it won't glob for packages.
     foreach pkgName [package names] {

Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/port1.0/portdestroot.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -190,7 +190,7 @@
 		    set mandir [file dirname $manlink]
 		    set mandirpath [file join $manpath $mandir]
 		    set pwd [pwd]
-		    if {[catch {cd $mandirpath} err]} {
+		    if {[catch {_cd $mandirpath} err]} {
 			puts $err
 			return
 		    }
@@ -208,7 +208,7 @@
 			file delete $manlinkpath
 			system "ln -s \"${manlinksrc}.gz\" \"$manlinkpath\""
 		    }
-		    cd $pwd
+		    _cd $pwd
 		}
 	    }
 	} else {

Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/port1.0/portinstall.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -78,7 +78,7 @@
 proc directory_dig {rootdir workdir regref {cwd ""}} {
     global installPlist
     set pwd [pwd]
-    if {[catch {cd $workdir} err]} {
+    if {[catch {_cd $workdir} err]} {
 	puts $err
 	return
     }
@@ -124,7 +124,7 @@
 	    directory_dig $rootdir $name $regref [file join $cwd $name]
 	}
     }
-    cd $pwd
+    _cd $pwd
 }
 
 proc install_main {args} {
@@ -188,6 +188,6 @@
 	}
 	set space " "
     }
-    append p "} {" [info body $pname] "\}"
+    append p "\} \{" [info body $pname] "\}"
     return $p
 }

Modified: trunk/base/src/port1.0/portpatch.tcl
===================================================================
--- trunk/base/src/port1.0/portpatch.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/port1.0/portpatch.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -69,7 +69,7 @@
     if {![info exists patchlist]} {
 	return -code error [msgcat::mc "Patch files missing"]
     }
-    cd [option worksrcpath]
+    _cd [option worksrcpath]
     foreach patch $patchlist {
 	ui_info "$UI_PREFIX [format [msgcat::mc "Applying %s"] $patch]"
 	if {[option os.platform] == "linux"} {

Modified: trunk/base/src/port1.0/resources/group/gnustep-1.0.tcl
===================================================================
--- trunk/base/src/port1.0/resources/group/gnustep-1.0.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/port1.0/resources/group/gnustep-1.0.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -228,7 +228,7 @@
             
             ui_msg "--->  Making Documentation for ${name}"
             
-            cd ${worksrcpath}/Documentation
+            _cd ${worksrcpath}/Documentation
             system "${destroot.env} ${destroot.cmd} \
                     ${destroot.pre_args} ${destroot.destdir}"
             
@@ -245,4 +245,4 @@
     }    
 }
 
-                    
\ No newline at end of file
+                    

Modified: trunk/base/src/port1.0/resources/group/ruby-1.0.tcl
===================================================================
--- trunk/base/src/port1.0/resources/group/ruby-1.0.tcl	2007-09-09 01:05:34 UTC (rev 28795)
+++ trunk/base/src/port1.0/resources/group/ruby-1.0.tcl	2007-09-09 05:29:36 UTC (rev 28796)
@@ -180,7 +180,7 @@
 			build			{}
 
 			destroot {
-				cd ${worksrcpath}/${ruby.srcdir}
+				_cd ${worksrcpath}/${ruby.srcdir}
 				xinstall -d -m 0755 ${destroot}${ruby.lib}
 				foreach dir [exec find . -type d] {
 					set dir [strsed ${dir} {s|^[.]/||}]
@@ -272,12 +272,12 @@
 			}
 			
 			destroot {
-			  cd ${worksrcpath}
+			  _cd ${worksrcpath}
 			  system "${prefix}/bin/gem install --local --force --install-dir ${destroot}${prefix}/lib/ruby/gems/${ruby.version} ${distpath}/${distname}"
 			
 				set binDir ${destroot}${prefix}/lib/ruby/gems/${ruby.version}/bin
 				if {[file isdirectory $binDir]} {
-					cd $binDir
+					_cd $binDir
 					foreach file [readdir $binDir] {
 						file copy $file ${destroot}${prefix}/bin
 					}
@@ -291,7 +291,7 @@
 	}
 
 	post-destroot {
-		cd ${worksrcpath}
+		_cd ${worksrcpath}
 		# Install documentation files (if specified)
 		if {[llength ${ruby.docs}] > 0} {
 			set docPath ${prefix}/share/doc/${name}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070908/2dc880ae/attachment.html


More information about the macports-changes mailing list