From ab3e1a45915c55562e491e6afb5ac6a5ad73e911 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Tue, 21 Jul 2026 19:07:02 +1000 Subject: [PATCH] punk::mix::cli 0.5.2: modpod zip build falls back to punk::zip::mkzip when zipfs mkzip fails Tcl 8.7 builds predating core fix c971e6c7c4 (tkt 7d5f1c13089d463e7796 'zipfs mkzip broken on Windows dotfiles') die with 'non-unique path name' on dot-prefixed entries - hit by the templates modpod's layout .fossil-custom payloads (in the modpod source since G-087 stage 3) whenever a modpod rebuild triggers under such an interp (c:/tcl87 = 8.7a6 is the PATH-default tclsh here). Diagnosed from the eager punkcheck INPROGRESS remnants (two died-mid-transfer attempts) plus a 3-file minimal repro; the suspected punk::mix::base version-scheme conversion was coincidental and is innocent. The fallback reuses the invocation already established for zipfs-less interpreters (punk::zip::mkzip -base ...), deletes the partial zip a failed mkzip leaves behind (punk::zip::mkzip refuses to overwrite), and notes the interpreter + upstream ticket on stderr. Healthy interpreters keep the zipfs path. Verified: re-triggered templates-modpod rebuild under 8.7a6 completes exit 0 via the fallback; the built modpod mounts with identical entry sets under 9.0.3 and 8.7a6 (incl the .fossil-custom/mainmenu payload that broke mkzip); punkcheck/mix/lib suites 193 pass under 9.0.3. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- .../mix/{base-0.1.2.tm => base-999999.0a1.0.tm} | 0 src/modules/punk/mix/cli-999999.0a1.0.tm | 14 +++++++++++++- src/modules/punk/mix/cli-buildversion.txt | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) rename src/modules/punk/mix/{base-0.1.2.tm => base-999999.0a1.0.tm} (100%) diff --git a/src/modules/punk/mix/base-0.1.2.tm b/src/modules/punk/mix/base-999999.0a1.0.tm similarity index 100% rename from src/modules/punk/mix/base-0.1.2.tm rename to src/modules/punk/mix/base-999999.0a1.0.tm diff --git a/src/modules/punk/mix/cli-999999.0a1.0.tm b/src/modules/punk/mix/cli-999999.0a1.0.tm index dbc509ba..d33e8eb7 100644 --- a/src/modules/punk/mix/cli-999999.0a1.0.tm +++ b/src/modules/punk/mix/cli-999999.0a1.0.tm @@ -951,8 +951,20 @@ namespace eval punk::mix::cli { set wd [pwd] cd $buildfolder puts "zipfs mkzip $zipfile #modpod-$basename-$module_build_version" - zipfs mkzip $zipfile #modpod-$basename-$module_build_version + set mkzip_failed [catch {zipfs mkzip $zipfile #modpod-$basename-$module_build_version} errMkzip] cd $wd + if {$mkzip_failed} { + #Known core defect: Tcl 8.7 builds predating core fix c971e6c7c4 error + #'non-unique path name' on dot-prefixed entries on Windows (core tkt + #7d5f1c13089d463e7796 'zipfs mkzip broken on Windows dotfiles') - hit by + #layout .fossil-custom/.fossil-settings payloads in the templates modpod. + #Fall back to punk::zip::mkzip, the established path for zipfs-less + #interps (stores unix-style permissions and folder entries - an accepted + #archive variant; modpod stubs read both shapes). + puts stderr "zipfs mkzip failed under Tcl [info patchlevel] ($errMkzip) - falling back to punk::zip::mkzip (known pre-c971e6c7c4 Tcl 8.7 zipfs dotfile defect - core tkt 7d5f1c13089d463e7796)" + catch {file delete -- $zipfile} ;#a failed zipfs mkzip can leave a partial target zip - punk::zip::mkzip refuses to overwrite + punk::zip::mkzip -base $buildfolder -directory $buildfolder/#modpod-$basename-$module_build_version -- $zipfile * + } } else { #use -base $buildfolder so that -directory is included in the archive - the modpod stub relies on this - and extraction would be potentially messy otherwise diff --git a/src/modules/punk/mix/cli-buildversion.txt b/src/modules/punk/mix/cli-buildversion.txt index a37677da..2d88d947 100644 --- a/src/modules/punk/mix/cli-buildversion.txt +++ b/src/modules/punk/mix/cli-buildversion.txt @@ -1,6 +1,7 @@ -0.5.1 +0.5.2 #First line must be a semantic version number #all other lines are ignored. +#0.5.2 - modpod zip build: zipfs mkzip failure now falls back to punk::zip::mkzip (the established zipfs-less path) with a stderr note naming the interp and upstream ticket. Motivation: Tcl 8.7 builds predating core fix c971e6c7c4 (tkt 7d5f1c13089d463e7796 'zipfs mkzip broken on Windows dotfiles') die with 'non-unique path name' on dot-prefixed entries - hit by the templates modpod's layout .fossil-custom payloads (present since G-087 stage 3) when built under 8.7a6 #0.5.1 - comment-only: removed commented-out legacy punkcheck proc-pipeline call sites (installfile_begin/started/finished/skipped, start_installer_event) alongside their live OO equivalents - the legacy procs are retired to error shims in punkcheck 0.5.0 (G-094); no behaviour change #0.5.0 - added lib::prune_superseded_target_modules and lib::prune_sourcevanished_targets; build_modules_from_source_to_base now prunes punkcheck-recorded superseded module versions from target dirs (recorded as punkcheck DELETE events) and records virtual module_name/module_version sources on installs (punkcheck 0.3.0 targetset_addsource_virtual); requires punk::mix::util explicitly #0.4.0 - updated -max_depth to -max-depth at punkcheck::install call sites — call-site flag change warrants minor bump