Changeset 7156


Ignore:
Timestamp:
May 22, 2004, 9:31:48 PM (16 years ago)
Author:
jkh
Message:

Add another (optional) argument to dportopen so that we can defeat the cache in cases where we need to open an existing instance
but set different options for it.
Reviewed by: kvv

Location:
trunk/base/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r7142 r7156  
    287287# DarwinPorts Portfile.
    288288
    289 proc dportopen {porturl {options ""} {variations ""}} {
     289proc dportopen {porturl {options ""} {variations ""} {nocache ""}} {
    290290    global darwinports::portinterp_options darwinports::portdbpath darwinports::portconf darwinports::open_dports auto_path
    291291
     
    293293        # XXX: should compare options and variations here too.
    294294        # if found, return the existing reference and bump the refcount.
    295         set dport [dlist_search $darwinports::open_dports porturl $porturl]
     295        if {$nocache != ""} {
     296                set dport {}
     297        } else {
     298                set dport [dlist_search $darwinports::open_dports porturl $porturl]
     299        }
    296300        if {$dport != {}} {
    297301                set refcnt [ditem_key $dport refcnt]
  • trunk/base/src/package1.0/portmpkg.tcl

    r7155 r7156  
    9696                        # only the prefix gets passed to the worker.
    9797                        ui_debug "building dependency package: $portname"
    98                         set worker [dportopen $portinfo(porturl) [list prefix $prefix package.destpath ${mpkgpath}/Contents/Resources]]
     98                        set worker [dportopen $portinfo(porturl) [list prefix $prefix package.destpath ${mpkgpath}/Contents/Resources] {} yes]
    9999                        dportexec $worker pkg
    100100                        dportclose $worker
  • trunk/base/src/port1.0/portinstall.tcl

    r6916 r7156  
    5050        # Also check to see if it's this version or another
    5151        if {[string length [registry_exists $portname $portversion]]} {
    52             return -code error [format [msgcat::mc "Port %s already registered as installed."] $portname]
     52            ui_msg "$UI_PREFIX [format [msgcat::mc "Port %s already registered as installed."] $portname]"
    5353        } else {
    5454            return -code error [format [msgcat::mc "Another version of Port %s is already registered as installed.  Please uninstall the port first."] $portname]
  • trunk/base/src/portmgr/packageall.tcl

    r6271 r7156  
    378378        # Turn on verbose output for the build
    379379        set ui_options(ports_verbose) yes
    380         if {[catch {set workername [dportopen $porturl [array get options] [array get variations]]} result] ||
     380        if {[catch {set workername [dportopen $porturl [array get options] [array get variations] yes]} result] ||
    381381                $result == 1} {
    382382            ui_error "Internal error: unable to open port: $result"
  • trunk/base/src/portmgr/rpmall.tcl

    r3411 r7156  
    430430                        array set prebuildinfo [lindex $search 1]
    431431                        set ui_options(ports_verbose) yes
    432                         if {[catch {set workername [dportopen $prebuildinfo(porturl) [array get options] [array get variations]]} result] ||
     432                        if {[catch {set workername [dportopen $prebuildinfo(porturl) [array get options] [array get variations] yes]} result] ||
    433433                                $result == 1} {
    434434                                ui_error "Internal error: unable to install ${prebuild}... exiting"
Note: See TracChangeset for help on using the changeset viewer.