[83270] trunk/base/src

jmr at macports.org jmr at macports.org
Mon Aug 29 05:55:55 PDT 2011


Revision: 83270
          http://trac.macports.org/changeset/83270
Author:   jmr at macports.org
Date:     2011-08-29 05:55:50 -0700 (Mon, 29 Aug 2011)
Log Message:
-----------
don't warn about old ports tree if running selfupdate or sync (#23094)

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	2011-08-29 12:15:30 UTC (rev 83269)
+++ trunk/base/src/macports1.0/macports.tcl	2011-08-29 12:55:50 UTC (rev 83270)
@@ -963,14 +963,16 @@
     # load the quick index
     _mports_load_quickindex
 
-    set default_source_url [lindex ${sources_default} 0]
-    if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
-        set default_portindex [macports::getindex $default_source_url]
-        if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
-            ui_warn "port definitions are more than two weeks old, consider using selfupdate"
+    if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
+        set default_source_url [lindex ${sources_default} 0]
+        if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
+            set default_portindex [macports::getindex $default_source_url]
+            if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
+                ui_warn "port definitions are more than two weeks old, consider using selfupdate"
+            }
         }
     }
-    
+
     # init registry
     set db_path [file join ${registry.path} registry registry.db]
     set db_exists [file exists $db_path]

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2011-08-29 12:15:30 UTC (rev 83269)
+++ trunk/base/src/port/port.tcl	2011-08-29 12:55:50 UTC (rev 83270)
@@ -4680,6 +4680,9 @@
 # interactive mode
 if { [llength $remaining_args] == 0 && ![info exists ui_options(ports_commandfiles)] } {
     lappend ui_options(ports_commandfiles) -
+} elseif {[lookahead] == "selfupdate" || [lookahead] == "sync"} {
+    # tell mportinit not to tell the user they should selfupdate
+    set ui_options(ports_no_old_index_warning) 1
 }
 
 # Initialize mport
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110829/9f0f0e99/attachment.html>


More information about the macports-changes mailing list