Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/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

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@18739 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Charlie Allom
Charlie Allom committed Jul 26, 2006
1 parent 61137b4 commit 9b67212dc39e497a4b0741c76a35b71bc7193f9f
Showing with 39 additions and 2 deletions.
  1. +39 −2 src/port1.0/portfetch.tcl
@@ -1,6 +1,6 @@
# et:ts=4
# portfetch.tcl
# $Id: portfetch.tcl,v 1.112 2006/06/10 23:04:29 pguyot Exp $
# $Id: portfetch.tcl,v 1.113 2006/07/26 03:49:41 yeled Exp $
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
# All rights reserved.
@@ -277,6 +277,7 @@ proc checkfiles {args} {
proc cvsfetch {args} {
global workpath cvs.env cvs.cmd cvs.args cvs.post_args
global cvs.root cvs.date cvs.tag cvs.password
global patch_sites patchfiles filespath fetch_urls

set cvs.args "co ${cvs.args}"
if {[string length ${cvs.tag}]} {
@@ -311,6 +312,23 @@ proc cvsfetch {args} {
return -code error [msgcat::mc "CVS check out failed"]
}

# XXX this is a hack to make cvsfetch do the same as "standard fetch"
# should be it's own routine that can be called.
if {[info exists patchfiles]} {
foreach file $patchfiles {
if {![file exists $filespath/$file]} {
set distsite [getdisttag $file]
set file [getdistname $file]
lappend all_dist_files $file
if {$distsite != ""} {
lappend fetch_urls $distsite $file
} elseif {[info exists patch_sites]} {
lappend fetch_urls patch_sites $file
}
}
}
return [fetchfiles]
}
return 0
}

@@ -343,6 +361,24 @@ proc svnfetch {args} {
return -code error [msgcat::mc "Subversion check out failed"]
}

# XXX this is a hack to make svnfetch do the same as "standard fetch" (untested)
# should be it's own routine that can be called.
if {[info exists patchfiles]} {
foreach file $patchfiles {
if {![file exists $filespath/$file]} {
set distsite [getdisttag $file]
set file [getdistname $file]
lappend all_dist_files $file
if {$distsite != ""} {
lappend fetch_urls $distsite $file
} elseif {[info exists patch_sites]} {
lappend fetch_urls patch_sites $file
}
}
}
return [fetchfiles]
}

return 0
}

@@ -378,7 +414,8 @@ proc fetchfiles {args} {
if {![file writable $distpath]} {
return -code error [format [msgcat::mc "%s must be writable"] $distpath]
}
global portfetch::$url_var
# add master_sites & patch_sites here for when we call it from cvsfetch..
global portfetch::$url_var master_sites patch_sites
if {![info exists $url_var]} {
ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]
set url_var master_sites

0 comments on commit 9b67212

Please sign in to comment.
You can’t perform that action at this time.