Changeset 3884 for trunk/base


Ignore:
Timestamp:
Nov 3, 2003, 5:36:42 PM (20 years ago)
Author:
fkr
Message:

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

fallback to the opendarwin mirror list. The opendarwin mirror list
(currently these are 'distfiles.opendarwin.org', 'distfiles-od.opendarwin.org'
and 'distfiles-msn.opendarwin.org') is appended to the master_sites listing
given in the Portfile. The OpenDarwin site is tried at last before failing.

Location:
trunk/base/src/port1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portfetch.tcl

    r3652 r3884  
    6363default fetch.post_args {[portfetch::assemble_url ${site} ${distfile}]}
    6464
     65default fallback_mirror_site "opendarwin"
    6566default mirror_sites.listfile {"mirror_sites.tcl"}
    6667default mirror_sites.listpath {"${portresourcepath}/fetch/"}
     
    155156        return {}
    156157    }
    157    
     158
    158159    set ret [list]
    159160    foreach element $portfetch::mirror_sites::sites($mirrors) {
    160         if {"$subdir" == ""} {
     161       
     162        # here we have the chance to take a look at tags, that possibly
     163        # have been assigned in mirror_sites.tcl
     164        set splitlist [split $element :]
     165        if {[llength $splitlist] > 1} {
     166                set element "[lindex $splitlist 0]:[lindex $splitlist 1]"
     167                set mirror_tag "[lindex $splitlist 2]"
     168        }
     169
     170        if {$subdir == "" && $mirror_tag != "nosubdir"} {
    161171            set subdir ${portname}
    162172        }
    163173
    164         if {"$tag" != ""} {
     174        if {"$tag" != ""} {
    165175            eval append element "${subdir}:${tag}"
    166176        } else {
     
    169179        eval lappend ret $element
    170180    }
     181
    171182    return $ret
    172183}
     
    180191    global distdir distfiles patchfiles all_dist_files patch_sites fetch_urls \
    181192        master_sites filespath master_sites.mirror_subdir \
    182         patch_sites.mirror_subdir
     193        patch_sites.mirror_subdir fallback_mirror_site
     194
     195    append master_sites " ${fallback_mirror_site}"
    183196
    184197    foreach list {master_sites patch_sites} {
  • trunk/base/src/port1.0/resources/fetch/mirror_sites.tcl

    r3431 r3884  
    1 # $Id: mirror_sites.tcl,v 1.3 2003/09/12 23:48:35 fkr Exp $
     1# $Id: mirror_sites.tcl,v 1.4 2003/11/03 17:36:42 fkr Exp $
    22# mirror_sites.tcl
    33#
    44# List of master site classes for use in Portfiles
    55# Most of these are taken shamelessly from FreeBSD.
     6#
     7# Appending :nosubdir as a tag to a mirror, means that
     8# the portfetch target will NOT append a subdirectory to
     9# the mirror site.
    610#
    711# Please keep this list sorted.
     
    102106}
    103107
     108set portfetch::mirror_sites::sites(opendarwin) {
     109        http://distfiles.opendarwin.org/
     110        http://distfiles-od.opendarwin.org/:nosubdir
     111        http://distfiles-msn.opendarwin.org/:nosubdir
     112}
     113
    104114set portfetch::mirror_sites::sites(perl_cpan) {
    105115    http://www.cpan.dk/CPAN/modules/by-module/
Note: See TracChangeset for help on using the changeset viewer.