Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/6220

Submitted by:   dluke@
Reviewed by:    olegb@
Approved by:    olegb@
Obtained from:

dluke's optimization of the upgrade code.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@15647 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Ole Guldberg Jensen
Ole Guldberg Jensen committed Dec 30, 2005
1 parent 246696d commit fd5c722ca184b03aff6a6828c9f3e54b9de1c65f
Showing with 17 additions and 5 deletions.
  1. +17 −5 src/darwinports1.0/darwinports.tcl
@@ -1,5 +1,5 @@
# darwinports.tcl
# $Id: darwinports.tcl,v 1.200 2005/12/14 05:10:19 jberry Exp $
# $Id: darwinports.tcl,v 1.201 2005/12/30 16:03:51 olegb Exp $
#
# Copyright (c) 2002 Apple Computer, Inc.
# Copyright (c) 2004 - 2005 Paul Guyot, <pguyot@kallisys.net>.
@@ -1432,9 +1432,12 @@ proc darwinports::version {} {
}

# upgrade procedure
proc darwinports::upgrade {pname dspec variationslist optionslist} {
proc darwinports::upgrade {pname dspec variationslist optionslist {depscachename ""}} {
array set options $optionslist
array set variations $variationslist
if {![string match "" $depscachename]} {
upvar $depscachename depscache
}

# set to no-zero is epoch overrides version
set epoch_override 0
@@ -1571,22 +1574,31 @@ proc darwinports::upgrade {pname dspec variationslist optionslist} {
# build depends is upgraded
if {[info exists portinfo(depends_build)]} {
foreach i $portinfo(depends_build) {
if {![llength [array get depscache $i]]} {
set d [lindex [split $i :] end]
upgrade $d $i $variationslist $optionslist
set depscache($i) 1
upgrade $d $i $variationslist $optionslist depscache
}
}
}
# library depends is upgraded
if {[info exists portinfo(depends_lib)]} {
foreach i $portinfo(depends_lib) {
if {![llength [array get depscache $i]]} {
set d [lindex [split $i :] end]
upgrade $d $i $variationslist $optionslist
set depscache($i) 1
upgrade $d $i $variationslist $optionslist depscache
}
}
}
# runtime depends is upgraded
if {[info exists portinfo(depends_run)]} {
foreach i $portinfo(depends_run) {
if {![llength [array get depscache $i]]} {
set d [lindex [split $i :] end]
upgrade $d $i $variationslist $optionslist
set depscache($i) 1
upgrade $d $i $variationslist $optionslist depscache
}
}
}
}

0 comments on commit fd5c722

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