<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository mpbb.
</pre>
<p><a href="https://github.com/macports/mpbb/commit/9bdac0f4e9b215f6b20208d0a97f70dd87cbc3e8">https://github.com/macports/mpbb/commit/9bdac0f4e9b215f6b20208d0a97f70dd87cbc3e8</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 9bdac0f dependencies.tcl: try to catch all errors
</span>9bdac0f is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9bdac0f4e9b215f6b20208d0a97f70dd87cbc3e8
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Jan 11 13:08:49 2022 +1100
<span style='display:block; white-space:pre;color:#404040;'> dependencies.tcl: try to catch all errors
</span>---
tools/dependencies.tcl | 65 +++++++++++++++++++++++++++++++++++++-------------
1 file changed, 48 insertions(+), 17 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/tools/dependencies.tcl b/tools/dependencies.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 79dfff3..e17d766 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/tools/dependencies.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/tools/dependencies.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -320,31 +320,42 @@ proc deactivate_unneeded {portinfovar} {
</span> puts stderr "init took [expr {[clock seconds] - $start_time}] seconds"
set start_time [clock seconds]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-deactivate_unneeded portinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[catch {deactivate_unneeded portinfo} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "deactivate_unneeded failed: $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
puts stderr "deactivating unneeded ports took [expr {[clock seconds] - $start_time}] seconds"
set start_time [clock seconds]
# gather a list of dependencies with the correct variants (+universal is dealt
# with in specific ways)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {[mportdepends $mport "activate"] != 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "mportdepends $portname activate failed."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[catch {mportdepends $mport "activate"} result] || $result != 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "mportdepends $portname activate failed: $result"
</span> exit 2
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# sort these dependencies topologically; exclude the given port itself
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set dlist [dlist_append_dependents $macports::open_mports $mport {}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-dlist_delete dlist $mport
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# produce a list of deps in sorted order
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set dlist_sorted [list]
</span> proc append_it {ditem} {
lappend ::dlist_sorted $ditem
set ::mportinfo_array($ditem) [mportinfo $ditem]
return 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-dlist_eval $dlist {} [list append_it]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-unset dlist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # sort these dependencies topologically; exclude the given port itself
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dlist [dlist_append_dependents $macports::open_mports $mport {}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dlist_delete dlist $mport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # produce a list of deps in sorted order
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dlist_sorted [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dlist_eval $dlist {} [list append_it]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset dlist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} catch {{*} eCode eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "sorting dlist failed: $eMessage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
puts stderr "calculating deps took [expr {[clock seconds] - $start_time}] seconds"
set start_time [clock seconds]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -376,8 +387,13 @@ proc checkdep_failcache {ditem} {
</span> }
if {$failcache_dir ne ""} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checkdep_failcache $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checkdep_failcache $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch {{*} eCode eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "checkdep_failcache failed: $eMessage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span> }
puts stderr "checking failcache took [expr {[clock seconds] - $start_time}] seconds"
set start_time [clock seconds]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -497,8 +513,13 @@ set macports::channels(debug) stderr
</span> set macports::channels(info) stdout
set dependencies_counter 0
set any_built 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- install_dep $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ install_dep $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} catch {{*} eCode eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "install_dep failed: $eMessage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span> }
# Go back to being quiet
set macports::channels(debug) {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -509,7 +530,12 @@ set start_time [clock seconds]
</span>
if {$any_built} {
# active ports likely changed, so do this again
<span style='display:block; white-space:pre;background:#ffe0e0;'>- deactivate_unneeded portinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ deactivate_unneeded portinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch {{*} eCode eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "deactivate_unneeded failed: $eMessage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
proc activate_dep {ditem} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -532,8 +558,13 @@ proc activate_dep {ditem} {
</span> }
puts "Activating all dependencies..."
<span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- activate_dep $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach ditem $dlist_sorted {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ activate_dep $ditem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} catch {{*} eCode eMessage} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "activate_dep failed: $eMessage"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 2
</span> }
puts stderr "activating deps took [expr {[clock seconds] - $start_time}] seconds"
</pre><pre style='margin:0'>
</pre>