Opened 19 years ago

Last modified 9 years ago

#6220 closed defect

ENHANCEMENT: port upgrade checks ports multiple times — at Initial Version

Reported by: danielluke (Daniel J. Luke) Owned by: darwinports-bugs@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc:
Port:

Description

port upgrade could be sped up by not attempting to walk up parts of the dependency tree where it's already been.

Patch inline (tcl hates me, so it probably needs work):

Index: darwinports1.0/darwinports.tcl =============================================================== ==== RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/darwinports1.0/darwinports.tcl,v retrieving revision 1.200 diff -u -r1.200 darwinports.tcl --- darwinports1.0/darwinports.tcl 14 Dec 2005 05:10:19 -0000 1.200 +++ darwinports1.0/darwinports.tcl 23 Dec 2005 19:53:09 -0000 @@ -1432,9 +1432,12 @@

}

# 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 @@

# build depends is upgraded if {[info exists portinfo(depends_build)]} {

foreach i $portinfo(depends_build) {

  • set d [lindex [split $i :] end]
  • upgrade $d $i $variationslist $optionslist

+ if {![llength [array get depscache $i]]} { + set d [lindex [split $i :] end] + 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) {

  • set d [lindex [split $i :] end]
  • upgrade $d $i $variationslist $optionslist

+ if {![llength [array get depscache $i]]} { + set d [lindex [split $i :] end] + 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) {

  • set d [lindex [split $i :] end]
  • upgrade $d $i $variationslist $optionslist

+ if {![llength [array get depscache $i]]} { + set d [lindex [split $i :] end] + set depscache($i) 1 + upgrade $d $i $variationslist $optionslist depscache + }

}

}

}

Change History (0)

Note: See TracTickets for help on using tickets.