[70566] branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
and.damore at macports.org
and.damore at macports.org
Fri Aug 13 15:34:13 PDT 2010
Revision: 70566
http://trac.macports.org/changeset/70566
Author: and.damore at macports.org
Date: 2010-08-13 15:34:12 -0700 (Fri, 13 Aug 2010)
Log Message:
-----------
added is_upgrade variable to get upgrade action from CLI
Modified Paths:
--------------
branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
Modified: branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl 2010-08-13 22:33:45 UTC (rev 70565)
+++ branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl 2010-08-13 22:34:12 UTC (rev 70566)
@@ -67,6 +67,9 @@
variable force 0
variable use_reg2 0
variable noexec 0
+# This actually means that we're deactivate an installed port to activate \
+ another version of the same port
+variable is_upgrade 0
# Activate a "Port Image"
proc activate {name v optionslist} {
@@ -75,6 +78,7 @@
variable force
variable use_reg2
variable noexec
+ variable is_upgrade
if {[info exists options(ports_force)] && [string is true -strict $options(ports_force)] } {
set force 1
@@ -120,6 +124,7 @@
return -code error "Image error: ${name} @${version}_${revision}${variants} is already active."
}
}
+ if {$todeactivate ne ""} {set is_upgrade 1}
foreach a $todeactivate {
if {$noexec || ![registry::run_target $a deactivate [list ports_nodepcheck 1]]} {
deactivate $name "[$a version]_[$a revision][$a variants]" [list ports_nodepcheck 1]
@@ -199,7 +204,9 @@
global UI_PREFIX macports::registry.format macports::registry.path registry_open
array set options $optionslist
variable use_reg2
+ variable is_upgrade
+ puts "GSOCDBG:\tdeactivate\tis_upgrade:$is_upgrade"
if {[info exists options(ports_force)] && [string is true -strict $options(ports_force)] } {
# this not using the namespace variable is correct, since activate
# needs to be able to force deactivate independently of whether
@@ -414,7 +421,7 @@
ui_debug "copying $srcfile to $dstfile as it is a config file"
file copy $srcfile $dstfile
} else {
- puts "GSOCDBG:\tlinking $srcfile to $dstfile as it is a config file"
+ puts "GSOCDBG:\tlinking $srcfile to $dstfile"
# Try a hard link first and if that fails, a symlink
if {[catch {file link -hard $dstfile $srcfile}]} {
ui_debug "hardlinking $srcfile to $dstfile failed, symlinking instead"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100813/e1212fb3/attachment.html>
More information about the macports-changes
mailing list