A closer look indicates that tempfile is only actually used to build the package. The apparent use of which(1) is actually a shell function, however…
MY goof was breaking my initramfs, being _completely_ unable to read the tiny font, reverting to backup, futzing with it, seeing tempfile and which being called in setupcon, and having to go to work before I could dig much deeper.
As noted, tempfile is only actually used to build the package. Fixed that. Left the function in setupcon alone.
The apparent use of which all over the place is also a shell function, but the shell function just emulates command -v, so I subbed that out and removed the functions while I was at it. Tested the result on amd64 with amdgpu added to initramfs for early KMS so that I can take advantage of Plymouth for status messages I have some chance of being able to use, and a crypttab prompt that doesn't get lost in the impossibly small console text.
I realized while composing the email that my patch has some trailing whitespace removal—nvim is configured to do that to source files as it's usually desirable for git sanity, but I should've trimmed those hunks out of the patch and retested. I don't have time to do that tonight because I can't conveniently just reboot right now, so I'll send you the patch as tested. Feel free to omit purely whitespace change hunks.
You can maybe guess the major thrust of my attempts to fiddle with console-setup around the time this all happened: You don't even try to set the font in the initramfs anymore, and I've never actually figured out why Ubuntu's combination of console-setup and plymouth manages to just work and Debian's just doesn't—I've spent a little time prodding at packages from both.
I mostly know my way around a Debian system I think—when I reinstalled this machine about two weeks ago, I found that neither old nor new installer was really set up to preserve my LUKS devices with LVM on them, keep some partitions and format others, etc … so I just grabbed a live USB and installed the system with debootstrap. It … was faster than trying ti figure out if or how Calamares could do that, and I know the shell of the old debian installer didn't provide shell UI I'd need to open the LUKS partitions so the partitioner could use them without obliterating anything "helpfully" for me. *shrug*
I've gotten way off topic now, but I think I just need to write a hook to throw in setfont and the font to set along with some quick and dirty initramfs scripts to make sure it dances around plymouth. I had to do something similar with a MBP to work around proprietary Apple crap.
Anyway, hope this is useful. Salsa didn't exist when last I might've had an account on it to be able to actually finish this up as a PR. I've considered changing that a time or two. Perhaps when the Covidium passes.
Joseph