<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/7cc56fe2ed0c634a093f32627451a7d8dfd20053">https://github.com/macports/macports-base/commit/7cc56fe2ed0c634a093f32627451a7d8dfd20053</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 7cc56fe2ed0c634a093f32627451a7d8dfd20053
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Jun 12 21:33:44 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> action_{snapshot,restore,migrate}: check permissions
</span>---
src/port/port.tcl | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
<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 f20bc8f89..fed6c6331 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;'>@@ -2499,18 +2499,27 @@ proc action_reclaim { action portlist opts } {
</span> }
proc action_snapshot { action portlist opts } {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[prefix_unwritable]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> if {[catch {macports::snapshot_main $opts} result]} {
ui_debug $::errorInfo
return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $result
</span> }
proc action_restore { action portlist opts } {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[prefix_unwritable]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> return [macports::restore_main $opts]
}
proc action_migrate { action portlist opts } {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[prefix_unwritable]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> set result [macports::migrate_main $opts]
if {$result == -999} {
# MacPorts base was upgraded, re-execute migrate with the --continue flag
</pre><pre style='margin:0'>
</pre>