<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-infrastructure.
</pre>
<p><a href="https://github.com/macports/macports-infrastructure/commit/05a307e4ecfcf46893ad3de81dd541e6a45a0c2c">https://github.com/macports/macports-infrastructure/commit/05a307e4ecfcf46893ad3de81dd541e6a45a0c2c</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 05a307e distributable_lib: conflict reporting improvements
</span>05a307e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 05a307e4ecfcf46893ad3de81dd541e6a45a0c2c
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Nov 20 06:38:03 2021 +1100
<span style='display:block; white-space:pre;color:#404040;'> distributable_lib: conflict reporting improvements
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Don't report a dependency's license exception as the reason for a
</span><span style='display:block; white-space:pre;color:#404040;'> conflict. Handle (invalid) empty license lists and sublists better.
</span>---
jobs/distributable_lib.tcl | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/jobs/distributable_lib.tcl b/jobs/distributable_lib.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index fc9eb9d..9211584 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/jobs/distributable_lib.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/jobs/distributable_lib.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -213,9 +213,13 @@ proc check_licenses {portName variantInfo} {
</span> }
set top_license_names [list]
# check that top-level port's license(s) are good
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$top_license eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list 1 "\"$portName\" is not distributable because its license option is empty"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> foreach sublist $top_license {
# each element may be a list of alternatives (i.e. only one need apply)
set any_good 0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lic ""
</span> set sub_names [list]
foreach full_lic $sublist {
# chop off any trailing version number
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -250,6 +254,9 @@ proc check_licenses {portName variantInfo} {
</span> continue
}
set aPortLicense [lindex $aPortInfo 1]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$aPortLicense eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list 1 "\"$portName\" is not distributable because its dependency \"$aPort\" has an empty license option"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> set installs_libs [lindex $aPortInfo 2]
if {!$installs_libs} {
continue
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,11 +264,13 @@ proc check_licenses {portName variantInfo} {
</span> foreach sublist $aPortLicense {
set any_good 0
set any_compatible 0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lic ""
</span> # check that this dependency's license(s) are good
foreach full_lic $sublist {
set lic [remove_version [string tolower $full_lic]]
if {[info exists ::license_good($lic)]} {
set any_good 1
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set conflicting_dep_lic $full_lic
</span> } else {
# no good being compatible with other licenses if it's not distributable itself
continue
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -315,7 +324,7 @@ proc check_licenses {portName variantInfo} {
</span> # This is a mistake, but let's handle it gracefully anyway.
set display_lic ""
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [list 1 "\"$portName\" is not distributable because its license${display_lic}conflicts with license \"$full_lic\" of dependency \"$aPort\""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list 1 "\"$portName\" is not distributable because its license${display_lic}conflicts with license \"$conflicting_dep_lic\" of dependency \"$aPort\""]
</span> }
}
</pre><pre style='margin:0'>
</pre>