<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository mpbb.
</pre>
<p><a href="https://github.com/macports/mpbb/commit/22dd3cc862a48c1e9b4462ca4e611379f36815a8">https://github.com/macports/mpbb/commit/22dd3cc862a48c1e9b4462ca4e611379f36815a8</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 22dd3cc Fix mirroring skipping logic
</span>22dd3cc is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 22dd3cc862a48c1e9b4462ca4e611379f36815a8
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Mar 11 04:31:36 2018 +1100
<span style='display:block; white-space:pre;color:#404040;'> Fix mirroring skipping logic
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Doesn't really matter whether a port failed this run, we just care that
</span><span style='display:block; white-space:pre;color:#404040;'> we've processed it.
</span>---
tools/mirror-multi.tcl | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/tools/mirror-multi.tcl b/tools/mirror-multi.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 102b03f..7b838f1 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/tools/mirror-multi.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/tools/mirror-multi.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,7 +48,7 @@ foreach vers {10 11 12 13 14 15 16 17} {
</span> }
set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-array set tried_and_failed {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+array set processed {}
</span> array set mirror_done {}
proc check_mirror_done {portname} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -135,11 +135,12 @@ proc get_variants {portinfovar} {
</span> }
proc mirror_port {portinfo_list} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global platforms deptypes tried_and_failed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global platforms deptypes processed
</span>
array set portinfo $portinfo_list
set portname $portinfo(name)
set porturl $portinfo(porturl)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set processed($portname) 1
</span> set do_mirror 1
if {[lsearch -exact -nocase $portinfo(license) "nomirror"] >= 0} {
ui_msg "Not mirroring $portname due to license"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -147,7 +148,6 @@ proc mirror_port {portinfo_list} {
</span> }
if {[catch {mportopen $porturl [list subport $portname] {}} mport]} {
ui_error "mportopen $porturl failed: $mport"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tried_and_failed($portname) 1
</span> return 1
}
array unset portinfo
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -205,7 +205,7 @@ proc mirror_port {portinfo_list} {
</span> }
foreach dep [lsort -unique $deps] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists tried_and_failed($dep)] && ![check_mirror_done $dep]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists processed($dep)] && ![check_mirror_done $dep]} {
</span> set result [mportlookup $dep]
if {[llength $result] < 2} {
ui_error "No such port: $dep"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -220,8 +220,6 @@ proc mirror_port {portinfo_list} {
</span>
if {$any_failed == 0} {
set_mirror_done $portname
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tried_and_failed($portname) 1
</span> }
return $any_failed
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -234,12 +232,12 @@ if {[lindex $::argv 0] eq "-c"} {
</span>
set exitval 0
foreach portname $::argv {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[info exists tried_and_failed($portname)]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "skipping ${portname}, already tried and failed"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists processed($portname)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "skipping ${portname}, already processed"
</span> continue
}
if {[check_mirror_done $portname]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "skipping ${portname}, already mirrored"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "skipping ${portname}, previously mirrored"
</span> continue
}
</pre><pre style='margin:0'>
</pre>