[52731] trunk/base/src

blb at macports.org blb at macports.org
Sun Jun 21 23:23:18 PDT 2009


Revision: 52731
          http://trac.macports.org/changeset/52731
Author:   blb at macports.org
Date:     2009-06-21 23:23:18 -0700 (Sun, 21 Jun 2009)
Log Message:
-----------
base/src - remove binaryInPath and findBinary from port1.0/portutil.tcl and instead use those in macports1.0/macports.tcl

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2009-06-22 06:15:22 UTC (rev 52730)
+++ trunk/base/src/macports1.0/macports.tcl	2009-06-22 06:23:18 UTC (rev 52731)
@@ -799,6 +799,8 @@
     $workername alias getdefaultportresourcepath macports::getdefaultportresourcepath
     $workername alias getprotocol macports::getprotocol
     $workername alias getportdir macports::getportdir
+    $workername alias findBinary macports::findBinary
+    $workername alias binaryInPath macports::binaryInPath
 
     # New Registry/Receipts stuff
     $workername alias registry_new registry::new_entry

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2009-06-22 06:15:22 UTC (rev 52730)
+++ trunk/base/src/port1.0/portutil.tcl	2009-06-22 06:23:18 UTC (rev 52731)
@@ -2118,33 +2118,6 @@
     return $size;
 }
 
-# check for a binary in the path
-# returns an error code if it cannot be found
-proc binaryInPath {binary} {
-    global env
-    foreach dir [split $env(PATH) :] {
-        if {[file executable [file join $dir $binary]]} {
-            return [file join $dir $binary]
-        }
-    }
-
-    return -code error [format [msgcat::mc "Failed to locate '%s' in path: '%s'"] $binary $env(PATH)];
-}
-
-# find a binary either in a path defined at MacPorts' configuration time
-# or in the PATH environment variable through binaryInPath (fallback)
-proc findBinary {prog {autoconf_hint ""}} {
-    if {${autoconf_hint} != "" && [file executable ${autoconf_hint}]} {
-        return ${autoconf_hint}
-    } else {
-        if {[catch {set cmd_path [binaryInPath ${prog}]} result] == 0} {
-            return ${cmd_path}
-        } else {
-            return -code error "${result} or at its MacPorts configuration time location, did you move it?"
-        }
-    }
-}
-
 # Set the UI prefix to something standard (so it can be grepped for in output)
 proc set_ui_prefix {} {
     global UI_PREFIX env
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090621/a5bc3efa/attachment.html>


More information about the macports-changes mailing list