[36745] trunk/base/src/registry1.0/receipt_flat.tcl

jmr at macports.org jmr at macports.org
Tue May 13 20:22:56 PDT 2008


Revision: 36745
          http://trac.macosforge.org/projects/macports/changeset/36745
Author:   jmr at macports.org
Date:     2008-05-13 20:22:56 -0700 (Tue, 13 May 2008)

Log Message:
-----------
Prevent duplicate dep_map entries from being inserted. Fix for #8763.

Modified Paths:
--------------
    trunk/base/src/registry1.0/receipt_flat.tcl

Modified: trunk/base/src/registry1.0/receipt_flat.tcl
===================================================================
--- trunk/base/src/registry1.0/receipt_flat.tcl	2008-05-13 22:03:11 UTC (rev 36744)
+++ trunk/base/src/registry1.0/receipt_flat.tcl	2008-05-14 03:22:56 UTC (rev 36745)
@@ -732,7 +732,11 @@
 
 proc register_dep {dep type port} {
 	variable dep_map
-	lappend dep_map [list $dep $type $port]
+	set newdep [list $dep $type $port]
+	# slow, but avoids duplicate entries building up
+	if {[lsearch -exact $dep_map $newdep] == -1} {
+	    lappend dep_map $newdep
+	}
 }
 
 proc unregister_dep {dep type port} {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080513/eaf063a0/attachment.html


More information about the macports-changes mailing list