<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/0bdc8652e3a27ae40b00f1866dcc9627b6db7965">https://github.com/macports/macports-base/commit/0bdc8652e3a27ae40b00f1866dcc9627b6db7965</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 0bdc8652e port diagnose: check for valid arch settings
</span>0bdc8652e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 0bdc8652e3a27ae40b00f1866dcc9627b6db7965
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Oct 17 16:36:22 2023 +1100
<span style='display:block; white-space:pre;color:#404040;'> port diagnose: check for valid arch settings
</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/57076
</span>---
src/macports1.0/diagnose.tcl | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/diagnose.tcl b/src/macports1.0/diagnose.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 3c2ac6b0b..a981d0aba 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/diagnose.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/diagnose.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -119,6 +119,7 @@ namespace eval diagnose {
</span> # Start the checks
check_path $config_options(macports_location) $config_options(profile_path) $config_options(shell_location)
check_macports_location
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_archs
</span> check_permissions
check_xcode config_options
check_for_app curl
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -844,4 +845,27 @@ namespace eval diagnose {
</span> ui_warn "Recommended directory permissions are 0755; use 'chmod 0755 <path>' to correct."
}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc check_archs {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set known_archs [list arm64 i386 ppc ppc64 x86_64]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {($macports::os_subplatform eq "macosx" && [llength $macports::build_arch] != 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [llength $macports::build_arch] > 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "build_arch should contain one architecture name, but it is currently '$macports::build_arch'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$macports::build_arch ni $known_archs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "build_arch should be one of '$known_archs', but it is currently '$macports::build_arch'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$macports::os_subplatform eq "macosx" && [llength $macports::universal_archs] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $macports::build_arch] == 1 && $macports::build_arch ni $macports::universal_archs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "universal_archs ($macports::universal_archs) should contain build_arch ($macports::build_arch)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $macports::universal_archs] < 2 && $macports::os_major ni [list 18 19]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "universal_archs should contain at least 2 archs, but it is currently '$macports::universal_archs'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach arch $macports::universal_archs {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$arch ni $known_archs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "universal_archs contains '$arch' which is not one of '$known_archs'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
</pre><pre style='margin:0'>
</pre>