[64639] trunk/base/src
jmr at macports.org
jmr at macports.org
Fri Mar 12 07:46:14 PST 2010
Revision: 64639
http://trac.macports.org/changeset/64639
Author: jmr at macports.org
Date: 2010-03-12 07:46:13 -0800 (Fri, 12 Mar 2010)
Log Message:
-----------
fix up running of activate target and autoclean
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-03-12 14:28:00 UTC (rev 64638)
+++ trunk/base/src/macports1.0/macports.tcl 2010-03-12 15:46:13 UTC (rev 64639)
@@ -1295,10 +1295,11 @@
set regref [lindex [registry::entry imaged $name $version $revision $variants] 0]
set portfile_dir [file join ${registry.path} registry portfiles $name "${version}_${revision}${variants}"]
file mkdir $portfile_dir
- set fd [open ${portfile_dir}/Portfile w]
+ set fd [open "${portfile_dir}/Portfile" w]
puts $fd [$regref portfile]
close $fd
-
+ file mtime "${portfile_dir}/Portfile" [$regref date]
+
set variations {}
set minusvariant [lrange [split [$regref negated_variants] -] 1 end]
set plusvariant [lrange [split [$regref variants] +] 1 end]
@@ -1611,18 +1612,17 @@
if {[string equal $target "install"]} {
# mark port as explicitly requested
$workername eval set user_options(ports_requested) 1
-
- # If we're doing an install, check if we should clean after
- if {[string equal ${macports::portautoclean} "yes"]} {
- set clean 1
- }
-
+
# If we're doing image installs, then we should activate after install
# xxx: This isn't pretty
if { [string equal ${macports::registry.installtype} "image"] } {
set target activate
}
}
+ if {[string equal ${macports::portautoclean} "yes"] && ([string equal $target "install"] || [string equal $target "activate"])} {
+ # If we're doing an install, check if we should clean after
+ set clean 1
+ }
# Build this port with the specified target
set result [$workername eval eval_targets $target]
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2010-03-12 14:28:00 UTC (rev 64638)
+++ trunk/base/src/port1.0/portutil.tcl 2010-03-12 15:46:13 UTC (rev 64639)
@@ -1460,7 +1460,7 @@
set dlist $targets
# the statefile will likely be autocleaned away after install,
- # so special-case ignore already-completed install and activate
+ # so special-case already-completed install and activate
if {[registry_exists $name $version $revision $portvariants]} {
if {$target == "install"} {
ui_debug "Skipping $target ($name) since this port is already installed"
@@ -1470,20 +1470,11 @@
if {[registry_prop_retr $regref active] != 0} {
# Something to close the registry entry may be called here, if it existed.
ui_debug "Skipping $target ($name @${version}_${revision}${portvariants}) since this port is already active"
+ return 0
} else {
- # do the activate here since target_run doesn't know how to selectively ignore the preceding steps
- if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
- ui_msg "For $name: skipping $target (dry run)"
- } else {
- if {[catch {registry_activate $name ${version}_${revision}${portvariants} [array get user_options]} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- ui_error "activating $name @${version}_${revision}${portvariants} failed: $result"
- return 1
- }
- }
+ # run the activate target but ignore its (completed) dependencies
+ return [target_run [lindex [dlist_search $dlist provides $target] 0]]
}
- return 0
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100312/21854e02/attachment.html>
More information about the macports-changes
mailing list