<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/8fd4a3910f1697cf7209a32c86ed6a9a9c22003e">https://github.com/macports/macports-base/commit/8fd4a3910f1697cf7209a32c86ed6a9a9c22003e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 8fd4a3910f1697cf7209a32c86ed6a9a9c22003e
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Jul 7 01:51:45 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> Distinguish hard and soft exit requests
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Hard means exit ASAP, whereas soft means the exit action was called but
</span><span style='display:block; white-space:pre;color:#404040;'> we can still do things like auto-run reclaim on the way out.
</span>---
src/port/port.tcl | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index cf2184965..bbdf5a668 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3990,7 +3990,7 @@ proc action_mirror { action portlist opts } {
</span>
proc action_exit { action portlist opts } {
# Return a semaphore telling the main loop to quit
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return -999
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -1
</span> }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4568,7 +4568,7 @@ proc process_cmd { argv } {
</span> portclient::notifications::display
# semaphore to exit
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$action_status == -999} break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$action_status < 0} break
</span> }
return $action_status
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4724,8 +4724,7 @@ proc process_command_file { in } {
</span> set exit_status [process_cmd $line]
# Check for semaphore to exit
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$exit_status == -999} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set exit_status 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$exit_status < 0} {
</span> break
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4759,8 +4758,8 @@ proc process_command_files { filelist } {
</span> close $in
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Exit on first failure unless -p was given
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$exit_status != 0 && ![macports::ui_isset ports_processall]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Exit on first failure unless -p was given. -999 overrides and always exits immediately.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {($exit_status != 0 && ![macports::ui_isset ports_processall]) || $exit_status == -999} {
</span> return $exit_status
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5669,14 +5668,18 @@ if { ($exit_status == 0 || [macports::ui_isset ports_processall]) && [info exist
</span> set exit_status 1
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {$exit_status == -999} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$exit_status == -1} {
</span> set exit_status 0
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Check the last time 'reclaim' was run and run it
</span> if {$exit_status == 0} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Check the last time 'reclaim' was run and run it
</span> macports::reclaim_check_and_run
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Hard exit, usually because base was updated, so we don't want to do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# anything on the way out. Hence do this after the reclaim check.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$exit_status == -999} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exit_status 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
# shut down macports1.0
mportshutdown
</pre><pre style='margin:0'>
</pre>