You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
New argument port fetch --no-mirrors
This flag avoids adding the mirrors defined by global_mirror_site to the list of fetch URLs. This is meant to aid in development of port updates. No mirror will have a distfile for a new port version, so there is no need to try.
This commit is contained in:
committed by
Clemens Lang
parent
6c8c70b370
commit
0cf1faf216
@@ -4450,6 +4450,7 @@ array set cmd_opts_array {
|
||||
rev-upgrade {id-loadcmd-check}
|
||||
diagnose {quiet}
|
||||
reclaim {enable-reminders disable-reminders}
|
||||
fetch {no-mirrors}
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
@@ -160,12 +160,17 @@ proc portfetch::checksites {sitelists mirrorfile} {
|
||||
continue
|
||||
}
|
||||
global ${listname}.mirror_subdir
|
||||
# add the specified global and user-defined mirrors
|
||||
set sglobal [lindex $extras 0]; set senv [lindex $extras 1]
|
||||
set full_list [set $listname]
|
||||
append full_list " $sglobal"
|
||||
if {[info exists env($senv)]} {
|
||||
set full_list [concat $env($senv) $full_list]
|
||||
# add the specified global and user-defined mirrors
|
||||
set sglobal ""
|
||||
set senv ""
|
||||
if {[llength $extras] >= 2} {
|
||||
set sglobal [lindex $extras 0]
|
||||
set senv [lindex $extras 1]
|
||||
append full_list " $sglobal"
|
||||
if {[info exists env($senv)]} {
|
||||
set full_list [concat $env($senv) $full_list]
|
||||
}
|
||||
}
|
||||
|
||||
set site_list [list]
|
||||
|
||||
@@ -272,12 +272,17 @@ proc portfetch::get_full_mirror_sites_path {} {
|
||||
# Perform the full checksites/checkpatchfiles/checkdistfiles sequence.
|
||||
# This method is used by distcheck target.
|
||||
proc portfetch::checkfiles {urls} {
|
||||
global global_mirror_site
|
||||
global global_mirror_site ports_fetch_no-mirrors
|
||||
upvar $urls fetch_urls
|
||||
|
||||
checksites [list patch_sites [list $global_mirror_site PATCH_SITE_LOCAL] \
|
||||
master_sites [list $global_mirror_site MASTER_SITE_LOCAL]] \
|
||||
[get_full_mirror_sites_path]
|
||||
set sites [list patch_sites {} \
|
||||
master_sites {}]
|
||||
if {![info exists ports_fetch_no-mirrors] || ${ports_fetch_no-mirrors} eq "no"} {
|
||||
set sites [list patch_sites [list $global_mirror_site PATCH_SITE_LOCAL] \
|
||||
master_sites [list $global_mirror_site MASTER_SITE_LOCAL]]
|
||||
}
|
||||
|
||||
checksites $sites [get_full_mirror_sites_path]
|
||||
checkpatchfiles fetch_urls
|
||||
checkdistfiles fetch_urls
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user