|
|
@ -847,23 +847,24 @@ tcl::namespace::eval punk::libunknown { |
|
|
|
#keys are in reverse order due to tclPkgUnknown processing order |
|
|
|
#keys are in reverse order due to tclPkgUnknown processing order |
|
|
|
set ordered_searchpaths [lreverse [dict keys $dict_added]];# ordered as in auto_path |
|
|
|
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 { |
|
|
|
dict for {pkg versiond} $refresh_dict { |
|
|
|
set versions [dict keys $versiond] |
|
|
|
set versions [dict keys $versiond] |
|
|
|
puts stderr "---->pkg:$pkg versions: $versions" |
|
|
|
#puts stderr "---->pkg:$pkg versions: $versions" |
|
|
|
foreach searchpath $ordered_searchpaths { |
|
|
|
foreach searchpath $ordered_searchpaths { |
|
|
|
set addedinfo [dict get $dict_added $searchpath] |
|
|
|
set addedinfo [dict get $dict_added $searchpath] |
|
|
|
set vidx -1 |
|
|
|
set vidx -1 |
|
|
|
foreach v $versions { |
|
|
|
foreach v $versions { |
|
|
|
incr vidx |
|
|
|
incr vidx |
|
|
|
if {[dict exists $addedinfo $pkg $v]} { |
|
|
|
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] |
|
|
|
set iscript [dict get $addedinfo $pkg $v scr] |
|
|
|
#todo - find the iscript in the '$epoch pkg epochs <e> added paths' lists and determine os vs dev vs internal |
|
|
|
#todo - find the iscript in the '$epoch pkg epochs <e> added paths' lists and determine os vs dev vs internal |
|
|
|
#(scanning for path directly in the ifneeded script for pkgs is potentially error prone) |
|
|
|
#(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) |
|
|
|
#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] |
|
|
|
set justaddedscript [package ifneeded $pkg $v] |
|
|
|
if {$justaddedscript ne $iscript} { |
|
|
|
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 |
|
|
|
package ifneeded $pkg $v $iscript |
|
|
|
#dict set pkgvdone $pkg $v 1 |
|
|
|
#dict set pkgvdone $pkg $v 1 |
|
|
|
} |
|
|
|
} |
|
|
|