Ticket #10827: upgrade-dependents-fix.diff
File upgrade-dependents-fix.diff, 3.7 KB (added by jmroot (Joshua Root), 16 years ago) |
---|
-
src/macports1.0/macports.tcl
2021 2021 ui_debug "Not following dependencies" 2022 2022 set depflag 0 2023 2023 } else { 2024 # If we're following dependents, we only want to follow this port's 2025 # dependents, not those of all its dependencies. Otherwise, we would 2026 # end up processing this port's dependents n+1 times (recursively!), 2027 # where n is the number of dependencies this port has, since this port 2028 # is of course a dependent of each of its dependencies. Plus the 2029 # dependencies could have any number of unrelated dependents. 2030 2031 # So we save whether we're following dependents, unset the option 2032 # while doing the dependencies, and restore it afterwards. 2033 set saved_do_dependents [info exists options(ports_do_dependents)] 2034 unset -nocomplain options(ports_do_dependents) 2035 2024 2036 # build depends is upgraded 2025 2037 if {[info exists portinfo(depends_build)]} { 2026 2038 foreach i $portinfo(depends_build) { 2027 2039 if {![llength [array get depscache $i]]} { 2028 2040 set d [lindex [split $i :] end] 2029 2041 set depscache($i) 1 2030 upgrade $d $i $variationslist $optionslistdepscache2042 upgrade $d $i $variationslist [array get options] depscache 2031 2043 } 2032 2044 } 2033 2045 } … … 2037 2049 if {![llength [array get depscache $i]]} { 2038 2050 set d [lindex [split $i :] end] 2039 2051 set depscache($i) 1 2040 upgrade $d $i $variationslist $optionslistdepscache2052 upgrade $d $i $variationslist [array get options] depscache 2041 2053 } 2042 2054 } 2043 2055 } … … 2047 2059 if {![llength [array get depscache $i]]} { 2048 2060 set d [lindex [split $i :] end] 2049 2061 set depscache($i) 1 2050 upgrade $d $i $variationslist $optionslistdepscache2062 upgrade $d $i $variationslist [array get options] depscache 2051 2063 } 2052 2064 } 2053 2065 } 2066 2067 # restore dependent-following to its former value 2068 if {$saved_do_dependents} { 2069 set options(ports_do_dependents) yes 2070 } 2054 2071 } 2055 2072 2056 2073 # check installed version against version in ports … … 2070 2087 2071 2088 if { [llength deplist] > 0 } { 2072 2089 foreach dep $deplist { 2073 set mpname [lindex $dep 2] 2074 macports::upgrade $mpname "port:$mpname" [array get variations] [array get options] 2090 set mpname [lindex $dep 2] 2091 if {![llength [array get depscache port:${mpname}]]} { 2092 set depscache(port:${mpname}) 1 2093 macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache 2094 } 2075 2095 } 2076 2096 } 2077 2097 } … … 2166 2186 2167 2187 if { [llength deplist] > 0 } { 2168 2188 foreach dep $deplist { 2169 set mpname [lindex $dep 2] 2170 macports::upgrade $mpname "port:$mpname" [array get variations] [array get options] 2189 set mpname [lindex $dep 2] 2190 if {![llength [array get depscache port:${mpname}]]} { 2191 set depscache(port:${mpname}) 1 2192 macports::upgrade $mpname port:${mpname} [array get variations] [array get options] depscache 2193 } 2171 2194 } 2172 2195 } 2173 2196 }