Browse Source

make.tcl fix premature fail of vfs creation when tclkit extraction fails

master
Julian Noble 3 days ago
parent
commit
716bc20063
  1. 23
      src/make.tcl

23
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

Loading…
Cancel
Save