[67612] contrib/port_cutleaves/port_cutleaves

perry at macports.org perry at macports.org
Fri May 14 21:53:01 PDT 2010


Revision: 67612
          http://trac.macports.org/changeset/67612
Author:   perry at macports.org
Date:     2010-05-14 21:52:59 -0700 (Fri, 14 May 2010)
Log Message:
-----------
* Bumped the version.
* If the registry format is receipt_sqlite, uninstall the port using its
  stored Portfile.
* Changed the default location for the base MacPorts Tcl file.

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

Modified: contrib/port_cutleaves/port_cutleaves
===================================================================
--- contrib/port_cutleaves/port_cutleaves	2010-05-14 18:47:47 UTC (rev 67611)
+++ contrib/port_cutleaves/port_cutleaves	2010-05-15 04:52:59 UTC (rev 67612)
@@ -4,7 +4,7 @@
 exec /usr/bin/tclsh "$0" "$@"
 # $Id$
 
-set VERSION 0.1.2
+set VERSION 0.1.3
 
 # - Procedures ---------------------------------------------------------------
 
@@ -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]
-            && [llength [registry::list_dependents [name $port] [version $port] [revision $port] [variants $port]]] < 1
+            && [registry::list_dependents [name $port] [version $port] [revision $port] [variants $port]] == ""
             && ![should_be_excluded $port $exclusions]
             && (!$option(b) || ![info exists build_deps([name $port])])} {
             lappend leaves $port
@@ -245,6 +245,13 @@
 
     set uninstalled {}
     foreach port $ports {
+        if {${macports::registry.format} == "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]
+                continue
+            }
+        }
         if {[catch {registry_uninstall::uninstall [name $port] \
                                                   [composite_version $port] {}} \
                    result]} {
@@ -273,7 +280,7 @@
     { F.arg ~/.port_leaves.exclude \
             "Specify a different file to read exclusions from" }
     { l     "List leaves and exit"}
-    { t.arg /Library/Tcl \
+    { t.arg /opt/local/share/macports/Tcl \
             "Specify a different location for the base MacPorts Tcl file" }
     { V     "Display version information and exit" }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100514/c33b1dd2/attachment.html>


More information about the macports-changes mailing list