Changeset 64292


Ignore:
Timestamp:
Feb 28, 2010, 8:13:29 PM (11 years ago)
Author:
jmr@…
Message:

reg2 updates, including fix for deadlock during install

Location:
trunk/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/macports.conf.in

    r63398 r64292  
    1212
    1313# Type of storage to use for the port registry information, "flat" or "sqlite"
     14# default is flat, sqlite is still experimental
    1415#portdbformat           flat
    1516
  • trunk/base/src/port1.0/portinstall.tcl

    r64201 r64292  
    148148    if {[string equal ${registry.format} "receipt_sqlite"]} {
    149149        # registry2.0
     150
     151        # can't do this inside the write transaction due to deadlock issues with _get_dep_port
     152        set dep_portnames [list]
     153        foreach deplist {depends_lib depends_run} {
     154            if {[info exists $deplist]} {
     155                foreach dep [set $deplist] {
     156                    set dep_portname [_get_dep_port $dep]
     157                    if {$dep_portname != ""} {
     158                        lappend dep_portnames $dep_portname
     159                    }
     160                }
     161            }
     162        }
     163
    150164        registry::write {
    151165
     
    158172            }
    159173
    160             foreach deplist {depends_lib depends_run} {
    161                 if {[info exists $deplist]} {
    162                     foreach dep [set $deplist] {
    163                         set dep_portname [_get_dep_port $dep]
    164                         if {$dep_portname != ""} {
    165                             $regref depends $dep_portname
    166                         }
    167                     }
    168                 }
     174            foreach dep_portname $dep_portnames {
     175                $regref depends $dep_portname
    169176            }
    170177
  • trunk/base/src/registry2.0/portimage.tcl

    r64269 r64292  
    118118            }
    119119
    120             if { [string equal [$requested state] "active"] } {
     120            if { [string equal [$requested state] "installed"] } {
    121121                return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
    122122            }
     
    452452                        if {[info exists portinfo(replaced_by)] && [lsearch -exact -nocase $portinfo(replaced_by) [$port name]] != -1} {
    453453                            lappend deactivated $owner
     454                            # XXX this is bad, deactivate does another write transaction (probably deadlocks)
    454455                            deactivate [$owner name] "" ""
    455456                            set owner {}
Note: See TracChangeset for help on using the changeset viewer.