From 716bc20063155bc67484c1114a6fdea6ff4304e0 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Fri, 29 Aug 2025 16:46:49 +1000 Subject: [PATCH] make.tcl fix premature fail of vfs creation when tclkit extraction fails --- src/make.tcl | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/make.tcl b/src/make.tcl index 1900e0ec..2efa1453 100644 --- a/src/make.tcl +++ b/src/make.tcl @@ -2906,8 +2906,8 @@ foreach vfstail $vfs_tails { set extract_kit_type "" while {!$extraction_done && [llength $extraction_trylist]} { - set extract_kit_type [lpop extraction_trylist 0] - switch -- $extract_kit_type { + set extract_kit_try [lpop extraction_trylist 0] + switch -- $extract_kit_try { zip - zipcat { #for a zipkit - we need to extract the existing vfs from the runtime #zipfs mkimg replaces the entire zipped vfs in the runtime - so we need the original data to be part of our targetvfs. @@ -2987,12 +2987,12 @@ foreach vfstail $vfs_tails { zipfile::decode::unzip $archiveinfo $extractedzipfolder }]} { set extraction_done 1 + set extract_kit_type $extract_kit_try + #todo - verify that init.tcl etc are present? + merge_over $extractedzipfolder $targetvfs } - #todo - verify that init.tcl etc are present? - merge_over $extractedzipfolder $targetvfs } - } cookit - cookfs { #upx easy enough to deal with if we have/install a upx executable (avail on windows via scoop, freshports for freebsd and presumably various for linux) @@ -3021,17 +3021,19 @@ foreach vfstail $vfs_tails { #copy from mounted runtime's vfs to the filesystem vfs merge_over $rtmountpoint $targetvfs set extraction_done 1 + set extract_kit_type $extract_kit_try } } } kit { if {!$have_sdx} { - puts stderr "no sdx available to wrap $targetkit" + puts stderr "no sdx available to unwrap $targetkit" lappend failed_kits [list kit $targetkit reason "sdx_executable_unavailable"] - $vfs_event targetset_end FAILED - $vfs_event destroy - $vfs_installer destroy - continue + #extraction fail for one type doesn't mean we have fully failed yet + #$vfs_event targetset_end FAILED + #$vfs_event destroy + #$vfs_installer destroy + continue ;#to next extraction attempt } set raw_runtime $buildfolder/raw_$runtime_fullname @@ -3061,6 +3063,7 @@ foreach vfstail $vfs_tails { merge_over [file rootname $building_runtime].vfs $targetvfs } set extraction_done 1 + set extract_kit_type $extract_kit_try file copy -force $building_runtime $raw_runtime } cd $prev_cwd