[64292] trunk/base
jmr at macports.org
jmr at macports.org
Sun Feb 28 12:13:33 PST 2010
Revision: 64292
http://trac.macports.org/changeset/64292
Author: jmr at macports.org
Date: 2010-02-28 12:13:29 -0800 (Sun, 28 Feb 2010)
Log Message:
-----------
reg2 updates, including fix for deadlock during install
Modified Paths:
--------------
trunk/base/doc/macports.conf.in
trunk/base/src/port1.0/portinstall.tcl
trunk/base/src/registry2.0/portimage.tcl
Modified: trunk/base/doc/macports.conf.in
===================================================================
--- trunk/base/doc/macports.conf.in 2010-02-28 18:54:08 UTC (rev 64291)
+++ trunk/base/doc/macports.conf.in 2010-02-28 20:13:29 UTC (rev 64292)
@@ -11,6 +11,7 @@
portdbpath @localstatedir_expanded@/macports
# Type of storage to use for the port registry information, "flat" or "sqlite"
+# default is flat, sqlite is still experimental
#portdbformat flat
# Type of installation to do for ports, "direct" or "image". See macports.conf(5) and online documentation.
Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl 2010-02-28 18:54:08 UTC (rev 64291)
+++ trunk/base/src/port1.0/portinstall.tcl 2010-02-28 20:13:29 UTC (rev 64292)
@@ -147,6 +147,20 @@
if {[string equal ${registry.format} "receipt_sqlite"]} {
# registry2.0
+
+ # can't do this inside the write transaction due to deadlock issues with _get_dep_port
+ set dep_portnames [list]
+ foreach deplist {depends_lib depends_run} {
+ if {[info exists $deplist]} {
+ foreach dep [set $deplist] {
+ set dep_portname [_get_dep_port $dep]
+ if {$dep_portname != ""} {
+ lappend dep_portnames $dep_portname
+ }
+ }
+ }
+ }
+
registry::write {
set regref [registry::entry create $name $version $revision $portvariants $epoch]
@@ -157,15 +171,8 @@
$regref default_variants $default_variants
}
- foreach deplist {depends_lib depends_run} {
- if {[info exists $deplist]} {
- foreach dep [set $deplist] {
- set dep_portname [_get_dep_port $dep]
- if {$dep_portname != ""} {
- $regref depends $dep_portname
- }
- }
- }
+ foreach dep_portname $dep_portnames {
+ $regref depends $dep_portname
}
if {${registry.installtype} == "image"} {
Modified: trunk/base/src/registry2.0/portimage.tcl
===================================================================
--- trunk/base/src/registry2.0/portimage.tcl 2010-02-28 18:54:08 UTC (rev 64291)
+++ trunk/base/src/registry2.0/portimage.tcl 2010-02-28 20:13:29 UTC (rev 64292)
@@ -117,7 +117,7 @@
return -code error "Image error: ${name} @${version}_${revision}${variants} not installed as an image."
}
- if { [string equal [$requested state] "active"] } {
+ if { [string equal [$requested state] "installed"] } {
return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
}
}
@@ -451,6 +451,7 @@
array set portinfo [lindex $result 1]
if {[info exists portinfo(replaced_by)] && [lsearch -exact -nocase $portinfo(replaced_by) [$port name]] != -1} {
lappend deactivated $owner
+ # XXX this is bad, deactivate does another write transaction (probably deadlocks)
deactivate [$owner name] "" ""
set owner {}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100228/aa063d6f/attachment.html>
More information about the macports-changes
mailing list