[66319] trunk/base/src

jmr at macports.org jmr at macports.org
Thu Apr 8 21:18:04 PDT 2010


Revision: 66319
          http://trac.macports.org/changeset/66319
Author:   jmr at macports.org
Date:     2010-04-08 21:18:02 -0700 (Thu, 08 Apr 2010)
Log Message:
-----------
reload quick index after syncing in batch or interactive mode (#20874)

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

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2010-04-09 04:07:24 UTC (rev 66318)
+++ trunk/base/src/macports1.0/macports.tcl	2010-04-09 04:18:02 UTC (rev 66319)
@@ -1914,6 +1914,11 @@
         }
     }
 
+    # refresh the quick index if necessary (batch or interactive run)
+    if {[info exists macports::ui_options(ports_commandfiles)]} {
+        _mports_load_quickindex
+    }
+
     if {$numfailed > 0} {
         return -code error "Synchronization of $numfailed source(s) failed"
     }
@@ -2182,6 +2187,8 @@
 proc _mports_load_quickindex {args} {
     global macports::sources macports::quick_index
 
+    unset -nocomplain macports::quick_index
+
     set sourceno 0
     foreach source $sources {
         unset -nocomplain quicklist

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2010-04-09 04:07:24 UTC (rev 66318)
+++ trunk/base/src/port/port.tcl	2010-04-09 04:18:02 UTC (rev 66319)
@@ -4346,6 +4346,12 @@
 # Get arguments remaining after option processing
 set remaining_args [lrange $cmd_argv $cmd_argn end]
 
+# If we have no arguments remaining after option processing then force
+# interactive mode
+if { [llength $remaining_args] == 0 && ![info exists ui_options(ports_commandfiles)] } {
+    lappend ui_options(ports_commandfiles) -
+}
+
 # Initialize mport
 # This must be done following parse of global options, as some options are
 # evaluated by mportinit.
@@ -4355,12 +4361,6 @@
     fatal "Failed to initialize MacPorts, $result"
 }
 
-# If we have no arguments remaining after option processing then force
-# interactive mode
-if { [llength $remaining_args] == 0 && ![info exists ui_options(ports_commandfiles)] } {
-    lappend ui_options(ports_commandfiles) -
-}
-
 # Set up some global state for our code
 global current_portdir
 set current_portdir [pwd]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100408/5d036d5f/attachment.html>


More information about the macports-changes mailing list