From 68598468cfffb01d6eb2f40555687de9da3ffeca Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Thu, 24 Jul 2025 00:14:39 +1000 Subject: [PATCH] make.tcl progress on stdout for testing --- src/bootsupport/modules/punk/libunknown-0.1.tm | 7 ++++--- src/bootsupport/modules/punkcheck-0.1.0.tm | 8 ++++++++ src/modules/punk/libunknown-0.1.tm | 5 +++-- src/modules/punkcheck-0.1.0.tm | 8 ++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/bootsupport/modules/punk/libunknown-0.1.tm b/src/bootsupport/modules/punk/libunknown-0.1.tm index 19d5177d..a4f56010 100644 --- a/src/bootsupport/modules/punk/libunknown-0.1.tm +++ b/src/bootsupport/modules/punk/libunknown-0.1.tm @@ -847,23 +847,24 @@ tcl::namespace::eval punk::libunknown { #keys are in reverse order due to tclPkgUnknown processing order set ordered_searchpaths [lreverse [dict keys $dict_added]];# ordered as in auto_path + #JN todo - look at tm epochs dict for {pkg versiond} $refresh_dict { set versions [dict keys $versiond] - puts stderr "---->pkg:$pkg versions: $versions" + #puts stderr "---->pkg:$pkg versions: $versions" foreach searchpath $ordered_searchpaths { set addedinfo [dict get $dict_added $searchpath] set vidx -1 foreach v $versions { incr vidx if {[dict exists $addedinfo $pkg $v]} { - ledit versions $vidx $vidx + ledit versions $vidx $vidx ;incr vidx -1 ;#maintain vidx as index into current state of $versions - not original state the foreach operates across. set iscript [dict get $addedinfo $pkg $v scr] #todo - find the iscript in the '$epoch pkg epochs added paths' lists and determine os vs dev vs internal #(scanning for path directly in the ifneeded script for pkgs is potentially error prone) #for .tm ifneeded scripts - the syntax is simple enough to determine directly (and ifneeded scr not stored for those anyway) set justaddedscript [package ifneeded $pkg $v] if {$justaddedscript ne $iscript} { - puts "---->refreshing $pkg $v - reverting to already stored from path:$searchpath versions: $versions" + #puts "---->refreshing $pkg $v - reverting to already stored from path:$searchpath versions: $versions" package ifneeded $pkg $v $iscript #dict set pkgvdone $pkg $v 1 } diff --git a/src/bootsupport/modules/punkcheck-0.1.0.tm b/src/bootsupport/modules/punkcheck-0.1.0.tm index 50bcc2f8..2c07e246 100644 --- a/src/bootsupport/modules/punkcheck-0.1.0.tm +++ b/src/bootsupport/modules/punkcheck-0.1.0.tm @@ -1599,6 +1599,7 @@ namespace eval punkcheck { #puts stdout "Current target dir: $current_target_dir" + set last_processed_dir "" foreach m $match_list { set new_tgt_cksum_info [list] set relative_target_path [file join $relative_target_dir $m] @@ -1617,6 +1618,13 @@ namespace eval punkcheck { continue } #puts stdout " checking file : $current_source_dir/$m" + set thismatchdir [file dirname $m] + if {$last_processed_dir ne $thismatchdir} { + puts stdout "\n checking files in [file join $current_source_dir $thismatchdir]" + set last_processed_dir $thismatchdir + } else { + puts -nonewline stdout . + } set ts_start [clock microseconds] set seconds [expr {$ts_start / 1000000}] set ts_start_iso [clock format $seconds -format "%Y-%m-%dT%H:%M:%S"] diff --git a/src/modules/punk/libunknown-0.1.tm b/src/modules/punk/libunknown-0.1.tm index 82fb87a9..a4f56010 100644 --- a/src/modules/punk/libunknown-0.1.tm +++ b/src/modules/punk/libunknown-0.1.tm @@ -847,9 +847,10 @@ tcl::namespace::eval punk::libunknown { #keys are in reverse order due to tclPkgUnknown processing order set ordered_searchpaths [lreverse [dict keys $dict_added]];# ordered as in auto_path + #JN todo - look at tm epochs dict for {pkg versiond} $refresh_dict { set versions [dict keys $versiond] - puts stderr "---->pkg:$pkg versions: $versions" + #puts stderr "---->pkg:$pkg versions: $versions" foreach searchpath $ordered_searchpaths { set addedinfo [dict get $dict_added $searchpath] set vidx -1 @@ -863,7 +864,7 @@ tcl::namespace::eval punk::libunknown { #for .tm ifneeded scripts - the syntax is simple enough to determine directly (and ifneeded scr not stored for those anyway) set justaddedscript [package ifneeded $pkg $v] if {$justaddedscript ne $iscript} { - puts "---->refreshing $pkg $v - reverting to already stored from path:$searchpath versions: $versions" + #puts "---->refreshing $pkg $v - reverting to already stored from path:$searchpath versions: $versions" package ifneeded $pkg $v $iscript #dict set pkgvdone $pkg $v 1 } diff --git a/src/modules/punkcheck-0.1.0.tm b/src/modules/punkcheck-0.1.0.tm index 50bcc2f8..2c07e246 100644 --- a/src/modules/punkcheck-0.1.0.tm +++ b/src/modules/punkcheck-0.1.0.tm @@ -1599,6 +1599,7 @@ namespace eval punkcheck { #puts stdout "Current target dir: $current_target_dir" + set last_processed_dir "" foreach m $match_list { set new_tgt_cksum_info [list] set relative_target_path [file join $relative_target_dir $m] @@ -1617,6 +1618,13 @@ namespace eval punkcheck { continue } #puts stdout " checking file : $current_source_dir/$m" + set thismatchdir [file dirname $m] + if {$last_processed_dir ne $thismatchdir} { + puts stdout "\n checking files in [file join $current_source_dir $thismatchdir]" + set last_processed_dir $thismatchdir + } else { + puts -nonewline stdout . + } set ts_start [clock microseconds] set seconds [expr {$ts_start / 1000000}] set ts_start_iso [clock format $seconds -format "%Y-%m-%dT%H:%M:%S"]