<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/2f19695d335c4f8b23bd46987f730c464db83f86">https://github.com/macports/macports-base/commit/2f19695d335c4f8b23bd46987f730c464db83f86</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 2f19695d3 selfupdate: check for missing Xcode license acceptance
</span>2f19695d3 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2f19695d335c4f8b23bd46987f730c464db83f86
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Sep 23 17:23:28 2023 +1000
<span style='display:block; white-space:pre;color:#404040;'> selfupdate: check for missing Xcode license acceptance
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/49169
</span>---
src/macports1.0/selfupdate.tcl | 8 ++++++++
1 file changed, 8 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/selfupdate.tcl b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 8932ff341..766e5d1aa 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -193,6 +193,14 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
</span> set sdk_arg {}
set jobs [macports:get_parallel_jobs yes]
if {$::macports::os_platform eq "darwin"} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ catch {exec /usr/bin/cc 2>@1} output
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set output [join [lrange [split $output "\n"] 0 end-1] "\n"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string match -nocase *license* $output]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "It seems you have not accepted the Xcode license; unable to build."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Agree to the license by opening Xcode or running `sudo xcodebuild -license'."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "Xcode license acceptance required"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set cc_arg "CC=/usr/bin/cc "
if {$::macports::os_major >= 18 || ![file exists /usr/include/sys/cdefs.h]} {
set cltpath /Library/Developer/CommandLineTools
</pre><pre style='margin:0'>
</pre>