[67613] contrib/port_cutleaves/port_cutleaves

perry at macports.org perry at macports.org
Fri May 14 22:51:57 PDT 2010


Revision: 67613
          http://trac.macports.org/changeset/67613
Author:   perry at macports.org
Date:     2010-05-14 22:51:51 -0700 (Fri, 14 May 2010)
Log Message:
-----------
Check /Library/Tcl and /opt/local/share/macports/Tcl by default.

Modified Paths:
--------------
    contrib/port_cutleaves/port_cutleaves

Modified: contrib/port_cutleaves/port_cutleaves
===================================================================
--- contrib/port_cutleaves/port_cutleaves	2010-05-15 04:52:59 UTC (rev 67612)
+++ contrib/port_cutleaves/port_cutleaves	2010-05-15 05:51:51 UTC (rev 67613)
@@ -75,7 +75,7 @@
                     puts "** $full_name will be kept.\n"
                 }
                 default {
-                    puts "** '$action' is an invalid answer.\n"
+                    puts "** '$action' is an invalid action.\n"
                     continue
                 }
             }
@@ -197,7 +197,7 @@
     foreach port $installed {
         set regref [registry::open_entry [name $port] [version $port] [revision $port] [variants $port] [epoch $port]]
         if {![registry::property_retrieve $regref requested]
-            && [registry::list_dependents [name $port] [version $port] [revision $port] [variants $port]] == ""
+            && [registry::list_dependents [name $port] [version $port] [revision $port] [variants $port]] eq ""
             && ![should_be_excluded $port $exclusions]
             && (!$option(b) || ![info exists build_deps([name $port])])} {
             lappend leaves $port
@@ -245,7 +245,7 @@
 
     set uninstalled {}
     foreach port $ports {
-        if {${macports::registry.format} == "receipt_sqlite"} {
+        if {${macports::registry.format} eq "receipt_sqlite"} {
             set regref [registry::open_entry [name $port] [version $port] [revision $port] [variants $port] [epoch $port]]
             if {[registry::run_target $regref uninstall {}]} {
                 lappend uninstalled [full_name $port]
@@ -280,7 +280,7 @@
     { F.arg ~/.port_leaves.exclude \
             "Specify a different file to read exclusions from" }
     { l     "List leaves and exit"}
-    { t.arg /opt/local/share/macports/Tcl \
+    { t.arg "" \
             "Specify a different location for the base MacPorts Tcl file" }
     { V     "Display version information and exit" }
 }
@@ -290,11 +290,17 @@
     exit 1
 }
 
-if {[catch {source $option(t)/macports1.0/macports_fastload.tcl} \
-           result]} {
+if {$option(t) eq ""} {
+    if {[catch {source /Library/Tcl/macports1.0/macports_fastload.tcl} result]
+        && [catch {source /opt/local/share/macports/Tcl/macports1.0/macports_fastload.tcl} result]} {
+        puts stderr "Error: $result"
+        exit 1
+    }
+} elseif {[catch {source $option(t)/macports1.0/macports_fastload.tcl} result]} {
     puts stderr "Error: $result"
     exit 1
 }
+
 package require macports
 if {[catch {mportinit} result]} {
     puts stderr "Error: $result"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100514/9195d295/attachment-0001.html>


More information about the macports-changes mailing list