Changeset 3954 for trunk/base
- Timestamp:
- Nov 15, 2003, 9:46:50 PM (20 years ago)
- Location:
- trunk/base/src/port1.0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portinstall.tcl
r3220 r3954 42 42 43 43 proc install_start {args} { 44 global UI_PREFIX portname 44 global UI_PREFIX portname portversion 45 45 46 ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s"] ${portname}]" 46 # Check to make sure this port is not already installed. This is a 47 # general check of the portname only, so previous versions will fail 48 # as well. 49 if {[string length [registry_exists $portname]]} { 50 # Also check to see if it's this version or another 51 if {[string length [registry_exists $portname $portversion]]} { 52 return -code error [format [msgcat::mc "Port %s already registered as installed."] $portname] 53 } else { 54 return -code error [format [msgcat::mc "Another version of Port %s is already registered as installed. Please uninstall the port first."] $portname] 55 } 56 } else { 57 ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s"] ${portname}]" 58 } 47 59 } 48 60 -
trunk/base/src/port1.0/portmain.tcl
r2947 r3954 86 86 default os.endian {[string range $tcl_platform(byteOrder) 0 [expr [string length $tcl_platform(byteOrder)] - 7]]} 87 87 88 89 88 # Select implicit variants 90 89 if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}} -
trunk/base/src/port1.0/portuninstall.tcl
r3220 r3954 47 47 global portname portversion UI_PREFIX 48 48 49 if {[string length [registry_exists $portname $portversion]]} {50 ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s -%s"] $portname $portversion]"49 if {[string length [registry_exists $portname]]} { 50 ui_msg "$UI_PREFIX [format [msgcat::mc "Uninstalling %s"] $portname]" 51 51 } 52 52 } … … 60 60 } 61 61 62 set rfile [registry_exists $portname $portversion]62 set rfile [registry_exists $portname] 63 63 if {[string length $rfile]} { 64 64 if {[regexp .bz2$ $rfile]} { … … 127 127 } 128 128 if {!$uninst_err || [tbool uninstall.force]} { 129 registry_delete $portname $portversion 129 if {[regexp .bz2$ $rfile]} { 130 regsub {.bz2$} $rfile {} r_file 131 set r_version [lindex [split $r_file -] 1] 132 } else { 133 set r_version [lindex [split $rfile -] 1] 134 } 135 registry_delete $portname $r_version 130 136 return 0 131 137 } … … 134 140 } 135 141 } 136 return -code error [ msgcat::mc "Uninstall failed: Port not registered as installed"]142 return -code error [format [msgcat::mc "Uninstall failed: Port %s not registered as installed"] $portname] 137 143 }
Note: See TracChangeset
for help on using the changeset viewer.