<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-contrib.
</pre>
<p><a href="https://github.com/macports/macports-contrib/commit/513c455d5a902fff2b38edf86abc15c36688bf85">https://github.com/macports/macports-contrib/commit/513c455d5a902fff2b38edf86abc15c36688bf85</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 513c455 Add noarch_check contrib script
</span>513c455 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 513c455d5a902fff2b38edf86abc15c36688bf85
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Jul 14 00:47:23 2021 +1000
<span style='display:block; white-space:pre;color:#404040;'> Add noarch_check contrib script
</span>---
noarch_check/noarch_check.tcl | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/noarch_check/noarch_check.tcl b/noarch_check/noarch_check.tcl
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..af14a92
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/noarch_check/noarch_check.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,30 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/usr/bin/env port-tclsh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Report any installed ports that either have supported_archs set to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 'noarch' and probably shouldn't because they installed one or more
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Mach-O binary files, or that don't have supported_archs set to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 'noarch' and probably should because they didn't install any Mach-O
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+package require macports
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+package require registry2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+mportinit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach p [registry::entry imaged] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set binary_files [registry::file search id [$p id] binary 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set archs [$p archs]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$archs eq "noarch" && $binary_files ne {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "[$p name] @[$p version]_[$p revision][$p variants] is marked as noarch but contains the following Mach-O files:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$p state] eq "installed"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pathtype actual_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pathtype path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f $binary_files {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " [$f $pathtype]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$archs ne "noarch" && $binary_files eq {}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "[$p name] @[$p version]_[$p revision][$p variants] appears to contain no Mach-O files but is not marked as noarch."
</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>