I see.
Yes, it does make sense now why you chose to replace the 'wrap phase.
I wonder.... perhaps it'd be better altogether if the (wrap-program) procedure could be re-written to not make ..*.real.real programs...? That would save us a lot of code-duplication...
I have come to understand wrap-program a little better and I realised your patch could have actually been fixed in a better way than I did. The issue is with the part of your code that runs
This is what matches all the .calibre-real files
If instead of that, it was:(find-files "." (lambda (file stat) (not (wrapper? file))))
or
(find-files "." (lambda (file stat) (not (string-prefix "." (basename file))))
It should avoid double wrapping. An even simpler way would have been to use (add-before 'wrap ..., instead of (add-after 'wrap ...The fact that this happened is a bug though. I created some
patches I think fix this for core-updates. It would have made your
original patch error and force you to fix it:
https://issues.guix.gnu.org/43367