I did not understand this comment. What is the problem with ExtensionName-KERNEL.tcz ?
The problem that you described, which I think is what you are saying for your script, only occurs when you are using the .dep files. The .tree files contain the KERNEL part of the TCZ name replaced with the KERNEL version so I don't think there will be a problem with my script. As my script does not include the option of running it for a different TCL version than the hardcoded values, I do not think it has such a problem.
One thing that I would like to admire is that both of you, and many others as well, created shell scripts to do this, and not Python. I really cannot do this in shell. You guys are good at this !
The problem is, all kernel module should follow that convention for dep files.
Kernel release may change value.
Thus in all dep files, we use string
-KERNEL to denote that the extension is a kernel module.
Your script doesn't process those files, neither reading nor writing.
For example
$ uname -r
6.6.8-tinycore
This is the kernel release, sometimes there maybe some major bugs in kernel.
If kernel 6.6.8 has one of those and 6.6.9 fixes that problem.
Then, after some evaluation, TC team will release TC15.1 with kernel 6.6.9
On the other hand, whenever a newer major release occurs, we move on to newer kernel.
Most packages can be copied directly without any trouble.
It would be tedious if we put actual kernel string into dep files.