[79540] branches/gsoc11-rev-upgrade/base/src

cal at macports.org cal at macports.org
Thu Jun 16 16:44:00 PDT 2011


Revision: 79540
          http://trac.macports.org/changeset/79540
Author:   cal at macports.org
Date:     2011-06-16 16:44:00 -0700 (Thu, 16 Jun 2011)
Log Message:
-----------
rev-upgrade: Move logic to macports1.0, port/port.tcl only remains the client
	Implement setting the binary flag in the database

Modified Paths:
--------------
    branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
    branches/gsoc11-rev-upgrade/base/src/port/port.tcl

Modified: branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-06-16 23:42:54 UTC (rev 79539)
+++ branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-06-16 23:44:00 UTC (rev 79540)
@@ -3514,3 +3514,17 @@
         return "/tmp"
     }
 }
+
+proc macports::revupgrade {args} {
+    set files [registry::file search active 1 binary -null]
+    if {[llength $files] > 0} {
+        ui_msg "---> Updating database of binaries"
+        set i 1
+        foreach f $files {
+            ui_debug "Updating binary flag for file $i of [llength $files]: [$f path]"
+            incr i
+            $f binary [fileIsBinary [$f path]]
+        }
+    }
+    return 0;
+}

Modified: branches/gsoc11-rev-upgrade/base/src/port/port.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/port/port.tcl	2011-06-16 23:42:54 UTC (rev 79539)
+++ branches/gsoc11-rev-upgrade/base/src/port/port.tcl	2011-06-16 23:44:00 UTC (rev 79540)
@@ -2466,12 +2466,7 @@
 }
 
 proc action_revupgrade { action portlist opts } {
-    set files [registry::file search active 1 binary -null]
-    puts "[llength $files] elements in the list"
-    foreach f $files {
-        puts [$f path]
-    }
-    return 0
+    return [macports::revupgrade]
 }
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110616/723b1845/attachment.html>


More information about the macports-changes mailing list