Changeset 18739 for trunk/base


Ignore:
Timestamp:
Jul 26, 2006, 3:49:41 AM (18 years ago)
Author:
yeled
Message:

Bug: 5269
Submitted by: yeled

this makes the portfetch code even uglier. i'm happy to back this out if it
proves to be too ugly.

what is *does* is grab the $patchfiles even if you fetch via CVS/SVN

File:
1 edited

Legend:

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

    r18325 r18739  
    11# et:ts=4
    22# portfetch.tcl
    3 # $Id: portfetch.tcl,v 1.112 2006/06/10 23:04:29 pguyot Exp $
     3# $Id: portfetch.tcl,v 1.113 2006/07/26 03:49:41 yeled Exp $
    44#
    55# Copyright (c) 2002 - 2003 Apple Computer, Inc.
     
    278278    global workpath cvs.env cvs.cmd cvs.args cvs.post_args
    279279    global cvs.root cvs.date cvs.tag cvs.password
     280    global patch_sites patchfiles filespath fetch_urls
    280281
    281282    set cvs.args "co ${cvs.args}"
     
    312313    }
    313314
     315# XXX this is a hack to make cvsfetch do the same as "standard fetch"
     316# should be it's own routine that can be called.
     317    if {[info exists patchfiles]} {
     318        foreach file $patchfiles {
     319            if {![file exists $filespath/$file]} {
     320                set distsite [getdisttag $file]
     321                set file [getdistname $file]
     322                lappend all_dist_files $file
     323                if {$distsite != ""} {
     324                    lappend fetch_urls $distsite $file
     325                } elseif {[info exists patch_sites]} {
     326                    lappend fetch_urls patch_sites $file
     327                }
     328            }
     329        }
     330        return [fetchfiles]
     331    }
    314332    return 0
    315333}
     
    344362    }
    345363
     364# XXX this is a hack to make svnfetch do the same as "standard fetch" (untested)
     365# should be it's own routine that can be called.
     366    if {[info exists patchfiles]} {
     367        foreach file $patchfiles {
     368            if {![file exists $filespath/$file]} {
     369                set distsite [getdisttag $file]
     370                set file [getdistname $file]
     371                lappend all_dist_files $file
     372                if {$distsite != ""} {
     373                    lappend fetch_urls $distsite $file
     374                } elseif {[info exists patch_sites]} {
     375                    lappend fetch_urls patch_sites $file
     376                }
     377            }
     378        }
     379        return [fetchfiles]
     380    }
     381
    346382    return 0
    347383}
     
    379415                                return -code error [format [msgcat::mc "%s must be writable"] $distpath]
    380416                        }
    381                         global portfetch::$url_var
     417# add master_sites & patch_sites here for when we call it from cvsfetch..
     418                        global portfetch::$url_var master_sites patch_sites
    382419                        if {![info exists $url_var]} {
    383420                                ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
Note: See TracChangeset for help on using the changeset viewer.