[67595] trunk/base/src/registry2.0/receipt_sqlite.tcl

jmr at macports.org jmr at macports.org
Thu May 13 12:50:29 PDT 2010


Revision: 67595
          http://trac.macports.org/changeset/67595
Author:   jmr at macports.org
Date:     2010-05-13 12:50:24 -0700 (Thu, 13 May 2010)
Log Message:
-----------
avoid registry conversion failure when filemap and contents don't correspond properly

Modified Paths:
--------------
    trunk/base/src/registry2.0/receipt_sqlite.tcl

Modified: trunk/base/src/registry2.0/receipt_sqlite.tcl
===================================================================
--- trunk/base/src/registry2.0/receipt_sqlite.tcl	2010-05-13 19:28:27 UTC (rev 67594)
+++ trunk/base/src/registry2.0/receipt_sqlite.tcl	2010-05-13 19:50:24 UTC (rev 67595)
@@ -266,7 +266,19 @@
         if {$props(installtype) == "image"} {
             $regref map $props(imagefiles)
             if {$props(state) == "installed"} {
-                $regref activate $props(imagefiles) $props(files)
+                if {[llength $props(imagefiles)] != [llength $props(files)]} {
+                    # deal with this mess, just drop the extras...
+                    set i 0
+                    set ilist {}; set flist {}
+                    while {$i < [llength $props(imagefiles)] && $i < [llength $props(files)]} {
+                        lappend ilist [lindex $props(imagefiles) $i]
+                        lappend flist [lindex $props(files) $i]
+                        incr i
+                    }
+                    $regref activate $ilist $flist
+                } else {
+                    $regref activate $props(imagefiles) $props(files)
+                }
             }
         } else {
             $regref map $props(files)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100513/5b822b04/attachment.html>


More information about the macports-changes mailing list