[53422] branches/gsoc09-logging/base/src
enl at macports.org
enl at macports.org
Sun Jul 5 12:08:14 PDT 2009
Revision: 53422
http://trac.macports.org/changeset/53422
Author: enl at macports.org
Date: 2009-07-05 12:08:14 -0700 (Sun, 05 Jul 2009)
Log Message:
-----------
Stages are set automatically for ui_message now
Modified Paths:
--------------
branches/gsoc09-logging/base/src/macports1.0/macports.tcl
branches/gsoc09-logging/base/src/port1.0/portutil.tcl
Modified: branches/gsoc09-logging/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc09-logging/base/src/macports1.0/macports.tcl 2009-07-05 18:53:08 UTC (rev 53421)
+++ branches/gsoc09-logging/base/src/macports1.0/macports.tcl 2009-07-05 19:08:14 UTC (rev 53422)
@@ -38,7 +38,7 @@
package require macports_util 1.0
namespace eval macports {
- namespace export bootstrap_options user_options portinterp_options open_mports ui_priorities port_stages
+ namespace export bootstrap_options user_options portinterp_options open_mports ui_priorities port_stages
variable bootstrap_options "\
portdbpath libpath binpath auto_path extra_env sources_conf prefix portdbformat \
portinstalltype portarchivemode portarchivepath portarchivetype portautoclean \
@@ -54,7 +54,7 @@
portarchivetype portautoclean porttrace keeplogs portverbose destroot_umask rsync_server \
rsync_options rsync_dir startupitem_type place_worksymlink \
mp_remote_url mp_remote_submit_url configureccache configuredistcc configurepipe buildnicevalue buildmakejobs \
- applications_dir frameworks_dir developer_dir universal_target universal_sysroot universal_archs $user_options"
+ applications_dir current_stage frameworks_dir developer_dir universal_target universal_sysroot universal_archs $user_options"
# deferred options are only computed when needed.
# they are not exported to the trace thread.
@@ -65,6 +65,7 @@
variable ui_priorities "debug info msg error warn"
variable port_stages "fetch checksum"
+ variable current_stage "main"
}
# Provided UI instantiations
@@ -128,11 +129,17 @@
set macports::channels($key) [concat $macports::channels($key) $::debuglog]
}
}
-
+proc ui_phase {phase} {
+ global macports::current_stage
+ set macports::current_stage $phase
+}
proc ui_message {priority prefix stage args} {
- global macports::channels ::debuglog
+ global macports::channels ::debuglog macports::current_stage
foreach chan $macports::channels($priority) {
- if {[info exists ::debuglog] && $chan == $::debuglog} {
+ if {[info exists ::debuglog] && ($chan == $::debuglog)} {
+ if {[info exists macports::current_stage]} {
+ set stage $macports::current_stage
+ }
set strprefix ":$priority:$stage "
if {[lindex $args 0] == "-nonewline"} {
puts -nonewline $chan "$strprefix[lindex $args 1]"
@@ -829,6 +836,7 @@
$workername alias mport_open mportopen
$workername alias mport_close mportclose
$workername alias mport_lookup mportlookup
+ $workername alias ui_phase ui_phase
# instantiate the UI call-backs
foreach priority ${macports::ui_priorities} {
Modified: branches/gsoc09-logging/base/src/port1.0/portutil.tcl
===================================================================
--- branches/gsoc09-logging/base/src/port1.0/portutil.tcl 2009-07-05 18:53:08 UTC (rev 53421)
+++ branches/gsoc09-logging/base/src/port1.0/portutil.tcl 2009-07-05 19:08:14 UTC (rev 53422)
@@ -1207,8 +1207,8 @@
set ports_dry_last_skipped ""
proc target_run {ditem} {
- global target_state_fd workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped
- set portname [option name]
+ global target_state_fd workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped current_stage
+ set portname [option name]
set result 0
set skipped 0
set procedure [ditem_key $ditem procedure]
@@ -1250,13 +1250,14 @@
# otherwise execute the task.
if {$skipped == 0} {
+
set target [ditem_key $ditem provides]
# Execute pre-run procedure
if {[ditem_contains $ditem prerun]} {
set result [catch {[ditem_key $ditem prerun] $targetname} errstr]
}
-
+ ui_phase $target
#start tracelib
if {($result ==0
&& [info exists ports_trace]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090705/5e710dfd/attachment.html>
More information about the macports-changes
mailing list