[103049] users/cal/base-sqlite-portindex/src/portindex1.0/sqlite.tcl

cal at macports.org cal at macports.org
Tue Feb 12 09:15:40 PST 2013


Revision: 103049
          https://trac.macports.org/changeset/103049
Author:   cal at macports.org
Date:     2013-02-12 09:15:40 -0800 (Tue, 12 Feb 2013)
Log Message:
-----------
portindex1.0/sqlite: make failed re-using an error

Modified Paths:
--------------
    users/cal/base-sqlite-portindex/src/portindex1.0/sqlite.tcl

Modified: users/cal/base-sqlite-portindex/src/portindex1.0/sqlite.tcl
===================================================================
--- users/cal/base-sqlite-portindex/src/portindex1.0/sqlite.tcl	2013-02-12 17:11:01 UTC (rev 103048)
+++ users/cal/base-sqlite-portindex/src/portindex1.0/sqlite.tcl	2013-02-12 17:15:40 UTC (rev 103049)
@@ -416,27 +416,21 @@
         if {$full_reindex != "1"} {
             set port_id [db onecolumn {SELECT id FROM tmpdb.portindex WHERE portdir = $portdir AND parentport = ""}]
             if {$port_id != ""} {
-                try {
-                    if {$oldmtime >= $mtime} {
-                        if {[info exists ui_options(ports_debug)]} {
-                            puts "Reusing existing entry for $portdir"
-                        }
+                if {$oldmtime >= $mtime} {
+                    if {[info exists ui_options(ports_debug)]} {
+                        puts "Reusing existing entry for $portdir"
+                    }
 
-                        # Re-using an entry in SQLite-based PortIndex is as easy as
-                        # doing nothing.
-                        # We need to mark the entries as valid to prevent them
-                        # from being garbage collected, though.
-                        # We'll do this for this port and all its subports at
-                        # once.
-                        [db eval {UPDATE portindex SET colorbit = 1 WHERE portdir = $portdir}]
+                    # Re-using an entry in SQLite-based PortIndex is as easy as doing nothing.
+                    # We need to mark the entries as valid to prevent them from being garbage
+                    # collected, though.
+                    # We'll do this for this port and all its subports at once.
+                    db eval {UPDATE portindex SET colorbit = 1 WHERE portdir = $portdir}
 
-                        # Add the number of changes entries to the skip count
-                        portindex::inc_skipped [db changes]
+                    # Add the number of changes entries to the skip count
+                    portindex::inc_skipped [db changes]
 
-                        return
-                    }
-                } catch {*} {
-                    ui_warn "Failed to re-use old entry for ${portdir}, making a new one"
+                    return
                 }
             }
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130212/a11050ee/attachment.html>


More information about the macports-changes mailing list