jw-pkg/test/unit/python/jw/pkg/cmds/secrets/Makefile
Jan Lindemann 508bbd613d
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m21s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m10s
CI / Packaging test (pull_request) Successful in 0s
cmds.secrets.lib.FilesContext: Write the compile output unfiltered
The path filter of the exec context filtered the compile's own file
operations: put() and rename() silently no-op on a filtered path, stat()
raises, and the compile swallows that into a false '<missing>' verdict.
A compile-templates run with a path filter therefore reported '@content'
for every template while installing nothing, and left the empty temp files
behind.

The filter scopes the distro's package selection, not the command's own
output. Write the compiled file and its temp unfiltered: put, stat, the
read of the previous output, rename, and unlink. The reads of the template
and of the attribute files keep the filter.

Add a unit test with a context whose package space holds only the template:
the output must be written and no temp must leak.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-11-09 20:02:51 +01:00

4 lines
93 B
Makefile

TOPDIR = ../../../../../../..
include $(TOPDIR)/make/proj.mk
include $(JWBDIR)/make/dirs.mk