| | 2009 | |
| | 2010 | # Make the -R switch work for fetch |
| | 2011 | if { $target == "fetch" && [info exists options(ports_do_dependents)]} { |
| | 2012 | if {[dportdepends $workername] != 0} { |
| | 2013 | break_softcontinue "Unable to determine dependents: $result" 1 status |
| | 2014 | } |
| | 2015 | # Build a list of dependencies to be fetched |
| | 2016 | set dlist [dlist_append_dependents $darwinports::open_dports $workername {}] |
| | 2017 | # Delete the port itself, because will be fetched after this block. |
| | 2018 | dlist_delete dlist $workername |
| | 2019 | |
| | 2020 | foreach dport $dlist { |
| | 2021 | # XXX code duplication. not sure how to refactor without touching everything |
| | 2022 | if {[catch {set result [dportexec $dport "fetch"]} result]} { |
| | 2023 | global errorInfo |
| | 2024 | dportclose $dport |
| | 2025 | ui_debug "$errorInfo" |
| | 2026 | break_softcontinue "Unable to fetch port: $result" 1 status |
| | 2027 | } |
| | 2028 | dportclose $dport |
| | 2029 | } |
| | 2030 | } |
| | 2031 | |